Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Rs · Mar 27, 2013 at 10:39 AM · shadertessellationdirectx 11

DirectX 11 tessellation not working

Hi all, I am trying to have the most basic DirectX tessellation shader to work.

  • My graphics card (nvidia geforce GTX 560 ti) supports DirectX 11

  • I verified with dxdiag.exe that I have DirectX 11 installed

  • I use Windows 7 and Unity 4.0.0b7 with DirectX 11 definitely activated both in Player Settings and in Preferences > General.

  • I gave all the required textures correctly (diffuse, heightmap and normal map).

The following shader is an EXAMPLE coming from THIS LINK and it just doesn't work. I don't see any tessellation happening.

 Shader "Tessellation Sample" {
         Properties {
             _EdgeLength ("Edge length", Range(2,50)) = 15
             _MainTex ("Base (RGB)", 2D) = "white" {}
             _DispTex ("Disp Texture", 2D) = "gray" {}
             _NormalMap ("Normalmap", 2D) = "bump" {}
             _Displacement ("Displacement", Range(0, 1.0)) = 0.3
             _Color ("Color", color) = (1,1,1,0)
             _SpecColor ("Spec color", color) = (0.5,0.5,0.5,0.5)
         }
         SubShader {
             Tags { "RenderType"="Opaque" }
             LOD 300
 
             CGPROGRAM
             #pragma surface surf BlinnPhong addshadow fullforwardshadows vertex:disp tessellate:tessEdge nolightmap
             #pragma target 5.0
             #include "Tessellation.cginc"
 
             struct appdata {
                 float4 vertex : POSITION;
                 float4 tangent : TANGENT;
                 float3 normal : NORMAL;
                 float2 texcoord : TEXCOORD0;
             };
 
             float _EdgeLength;
 
             float4 tessEdge (appdata v0, appdata v1, appdata v2)
             {
                 return UnityEdgeLengthBasedTess (v0.vertex, v1.vertex, v2.vertex, _EdgeLength);
             }
 
             sampler2D _DispTex;
             float _Displacement;
 
             void disp (inout appdata v)
             {
                 float d = tex2Dlod(_DispTex, float4(v.texcoord.xy,0,0)).r * _Displacement;
                 v.vertex.xyz += v.normal * d;
             }
 
             struct Input {
                 float2 uv_MainTex;
             };
 
             sampler2D _MainTex;
             sampler2D _NormalMap;
             fixed4 _Color;
 
             void surf (Input IN, inout SurfaceOutput o) {
                 half4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color;
                 o.Albedo = c.rgb;
                 o.Specular = 0.2;
                 o.Gloss = 1.0;
                 o.Normal = UnpackNormal(tex2D(_NormalMap, IN.uv_MainTex));
             }
             ENDCG
         }
         FallBack "Diffuse"
     }

Console shows this warning:

 Shader warning in 'Custom/TessallationBasic': Program 'tessvert_surf', undeclared identifier 'UnityEdgeLengthBasedTess' (compiling for d3d11) at line 93

Thanks in advance for your attention.

Steak

Temporary post scriptum: At the moment the search server is totally down so I couldn't crawl around very much looking for a solution before asking. I don't see lot of information out there anyway on these topics. I might delete this post if I see it's a duplicate soon. (I like to be tidy)

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by smb02dunnal · Mar 28, 2013 at 03:53 PM

Hello Riccardo!

Seems to work fine for me. It's because you aren't running the latest version of Unity, these functions didn't exist when the beta version was around.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

11 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity 5 Tessellation shaders vs. Standard 0 Answers

Adding Decal to Tessellated Material 0 Answers

DirectX 11 Tessellation Displacement Smooth Shader 1 Answer

Compute Shader crashes when buffer is too big 0 Answers

No Shadows on Tessellated Terrain 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges