![tessellation triangle texture tessellation triangle texture](https://i.pinimg.com/originals/25/41/aa/2541aa5715fb5eb800f80880bc364f81.jpg)
Here is a comparison between tessellation, POM and normal map, those captures come from the detail tessellation demo from D3D SDK. Of course it can just pass the vertices to the next stage if this is what is needed. And it is also responsible for generating vertices in clip space, like VS does without tessellation enabled.
![tessellation triangle texture tessellation triangle texture](https://thumbs.dreamstime.com/b/mosaic-tessellation-texture-floor-old-palace-mosaic-tessellation-texture-floor-104880218.jpg)
Whether it is phong tessellation, PN or flat tessellation is decided here. It is programmer’s job to evaluate the final clip space position with the intermediate data in the barycentric coordinate.ĭomain shader is the place for calculating the positions of generated vertices. One thing to be noted is that the vertices generated in tessellator are located in barycentric coordinate. It generates those tessellated triangles under the hood and feeds them with the constant data to the next stage, domain shader. It can’t be programmed directly and neither can it be setup through API interfaces, it is affected by tessellation factors, the output of hull shader (or TCS in OpenGL). And they both take in control points and generate some tessellation factors and per-patch constant data. Anyway, they are still pretty similar to each other. In OpenGL 4, it is called tessellation control shader and there is no extra per-patch constant function. There are two different functions in Hull Shader, one is the hull shader itself and the other is the constant function which runs on a per-patch basis.
![tessellation triangle texture tessellation triangle texture](https://i.pinimg.com/originals/72/84/04/728404b52b9f487b2a4c61084861fb5a.png)
There are three stages right after vertex shader, hull shader, tessellator and domain shader with each stage performing separate functionality. Tessellation is a new feature that enables graphics programmer to tessellate their triangles on the fly so that the geometry detail will be enriched. What is tessellation? This should be a question to be addressed first before everything. In this article, I’d like to mention some detail that I learned about tessellation.
Tessellation triangle texture how to#
Since tessellation factors, which determines how to tessellate the object, are calculated on the fly during rendering, level of detail can be decided based on factors like distance, angle, etc. It saves a lot of time by placing intense computation, like bone matrix multiplication, in vertex shader which only processes control points of the model.