However, there’s a part I found strange - maybe I don’t understand if fully (math/vocabulary wise). In “Section 2.X.2.1, Triangle Tessellation” there is a part about how the vertices for inner triangles are created. Specifically:
However, if this was correct, it would be flawed, in that for obtuse triangles it would be possible that the inner vertices are placed outside the original triangle.
I’ve tested it on an NVidia card, where the tessellation clearly results in correct concentric triangles.
Ah, I’ve somehow overlooked the part where it says that this is for “equilateral triangles”… which is even more disturbing since then I cannot find a general description/algorithm in this text. Well I’ll have the chance to test on different cards soon, so I’ll see how much they differ… I hope that it’s not too much
EDIT:
Hmm, thinking about it a bit more I think that the described algorithm should suffice anyway, as it should be possible to apply the same barycentric coordinates to any triangle then?
I think there is a mistake in the description… :-S
The right algorithm should be :
“the inner triangle corner is produced at the intersection of two lines extended parallel to the corner’s two adjacent edges…”
Otherwise as you point obtuse triangles can cause problems.
Same mistake in the openGl 4.0 specification (page 104).
That’s strange.
(Maybe they’ve written it that way to confuse ATI seeing that the unigine engine seems to behave incorrectly at times, and/or crashes even… but only on ATI cards)