The Tessellation Evaluation Shader (TES) takes the tessellated patch and computes the vertex values for each generated vertex. The tessellation primitive generator takes the input patch and subdivides it based on values computed by the TCS or provided as defaults. The TCS is optional default tessellation values can be used if no TCS is provided. Without this protection, gaps and breaks in what are supposed to be contiguous patches can occur. So if you have two adjacent patches that need to have different levels of tessellation, the TCS invocations for the different patches need to use their tessellation controls to ensure that the shared edge(s) between the patches use the same level of tessellation. Therefore, the TCS is primarily responsible for ensuring continuity across patches. The Tessellation Control Shader (TCS) determines how much tessellation to do (it can also adjust the actual patch data, as well as feed additional patch data to later stages). Each stage of the tessellation pipeline performs part of this process. Generally, the process of tessellation involves subdividing a patch of some type, then computing new vertex values (position, color, texture coordinates, etc.) for each of the vertices generated by this process. They are described below, in the order they are processed. Two of the stages are programmable between them is a fixed function stage. The tessellation process is divided into three stages which form an optional part of Vertex Processing in the rendering pipeline. Return UnityEdgeLengthBasedTess (v0.vertex, v1.vertex, v2.vertex, _EdgeLength) įloat d = tex2Dlod(_DispTex, float4(v.texcoord.xy,0,0)).Note: This describes the OpenGL 4.0 feature, not the old gluTess* tessellation functionality. #pragma surface surf BlinnPhong addshadow fullforwardshadows vertex:disp tessellate:tessEdge nolightmapįloat4 tessEdge (appdata v0, appdata v1, appdata v2) 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 |