Return UnityEdgeLengthBasedTess (v0.vertex, v1.vertex, v2.vertex, _EdgeLength) įloat d = tex2Dlod(_DispTex, float4(v.texcoord.xy,0,0)). #pragma surface surf BlinnPhong addshadow fullforwardshadows vertex:disp tessellate:tessEdge nolightmapįloat4 tessEdge (appdata v0, appdata v1, appdata v2) Tessellate(D2D1MATRIX3X2F&,FLOAT,ID2D1TessellationSink) Examples The following code example shows how to use Tessellate to create a set of clockwise-wound triangles that cover the geometry. It just moves vertices along their normals based on the amount coming from a displacement map: Shader "Tessellation Sample" This next example shows a surface shader that does some displacement mapping without using tessellation. No GPU tessellation, displacement in the vertex modifier
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |