One big problem with non-uniform tessellation is that if two adjacent patches are tessellated with different factors it can introduce holes in the mesh since there are no longer the same number of shared edges along the boundary. The inside tessellation factors are calculated as the average of the four edges I tried a number of different schemes and found this to give the smoothest transitions between tessellation factors, both within a patch and between adjacent patches. no tessellation (just the original edge). Anything further than the control distance away has a tessellation factor of 1, i.e. So if the centre of an edge is half the control distance away, it has half the maximum tessellation factor. For example if the distances we're talking about are from the origin (0, 0, 0), the current patch edge's centre point is at (50, 0, 0) and the control distance is 100 the ratio for that edge is 50/100 = 0.5, so the tessellation factor for that edge is 1 + 0.5(64 - 1) = 32.5 ~ 32. The centre point of each edge is found and the tessellation factor for that edge is calculated by linearly interpolating (lerping) from the maximal factor (64) to the minimal (1) based on the ratio of the centre point distance against some control distance. The tessellation factors for the initial 16 quad patches are calculated in the hull shader. In this case the total quad is split into 3 vertical sections (the leftmost and rightmost being handled by the yellow and pink edge factors) and 4 vertical sections (the top and bottom being the cyan and green edges). The horizontal inside factor is 3 and the vertical inside factor is 4 these determine how the inner (white) area is divided. The edge factors determine how many segments to split the original edge into. The yellow edge factor is 1, green is 2, pink is 3 and cyan is 4. The image on the right (taken from Fabien "ryg" Giesen's Trip Through the Graphics Pipeline) shows an example tessellation. For a quad there are actually 6 different tessellation factors: one for each edge and two for the centre. Uniform tessellation is relatively easy and is something I talk about more in my previous post.Ī much more interesting question is what if you apply different tessellation factors to different edges? DirectX11 lets you do this. The simplest way to do it is to tessellate uniformly, turning 1 quad into 4 (or more). Tessellating a quad in DirectX11 is not quite as straight-forward as you might think.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |