How can you tessellate degenerate triangles evenly?

Trending 2 months ago

If you usage nan tessellation shader for triangle patches, you tin only group nan pursuing 4 values to specify nan tessellation building of nan triangle:

gl_TessLevelOuter[0] gl_TessLevelOuter[1] gl_TessLevelOuter[2] gl_TessLevelInner[0]

But if nan original triangle spot is degenerated. For example, 2 edges are 2 units long, while nan past separator is 0.5 units long. How tin I tessellate it truthful that nan generated triangles person almost nan aforesaid separator length?

Well, nan gl_TessLevelOuter values of nan 3 edges tin easy beryllium group to values truthful that nan magnitude of nan generated edges of nan shorter and nan longer edges are astir equal. But nan gl_TessLevelInner cannot beryllium group to a elemental worth wherever nan soul genated vertices lucifer different outer tessellation levels. The outermost triangle ringing is ever mapped to nan outer tessellation levels, and nan soul generated vertices stay nan same.

Are location immoderate papers to hole thing for illustration this? Maybe straight successful nan render pipeline? Or done a compute shader? I'm only willing successful real time algorithms.