I'm working on making the hexagons tessellated sphere using the fully procedural/programmed approach. Basically I'm following the guidance @coproc gave as a reply to the question here: https://stackoverflow.com/questions/46777626/mathematically-producing-sphere-shaped-hexagonal-grid
For each icosahedron spherical triangle I'm trying to map points on such triangle into a planar normalized (i.e. from 0.0 to 1.0) UV coordinate space. See my question and solutions here: Bounding rectangle for a triangle and normalized coordinates
The implementation I've done is made in such way that I treat the triangle as a planar one and this seems to produce gaps on the edges of triangles.
See the picture of the result I'm unsure how to fix this, but I suppose if I treat triangle as a spherical one, this might solve the issue.
So two questions from my side:
- How do I map/project the coordinates of a spherical triangle to the plane, defined by 3 vertices of the triangle.
- Perhaps someone can have a look at the implementation linked below and point out the error.
P.S. The implementation that draws the picture above is located here: https://shaderfrog.com/app/view/2360
Done here at last (took me more than half year on and off):
https://shaderfrog.com/app/view/2977