I have a procedural mesh, but the material doesn’t render properly. Originally it worked fine, however for reasons I won’t discus here, I need a different set of triangles, so vertices coordinates are the same, UVs are the same, just the triangles are different, however I’m getting 2 different results.
It is the same shape, so it is the same set of points with the same set of UVs, only the triangles are different.
Even when I didn’t touch the code that generates the UVs, I checked, double checked, triple checked and quadruple checked, and there’s no doubt… UVs are indeed exactly the same in both cases, so why am I getting 2 different results?
I’m not sure if I follow your description correctly, but how could the UVs be the exact same if the mesh layout is different? You need UV coordinates that match the new geometry. In the top left corner your UVs have clearly been distorted, and maybe the triagular flat area is also just malformed UVs which cause the test checkerboard pattern to not render? Might be easier to look at it too if the world grid was disabled in Scene view.
This issue looks like UVs are not calculated for the new mesh. Although that if you are planning to continue work on simple shapes like this, I’d highly suggest you to use planar mapping, instead of creating UVs for the actual mesh. You could easily use YZ XZ XY planar mapping techniques.
On a side not, this is about triplanar mapping but you can check this article where I described how I used triplanar mapping which UVs are unusable because mesh is distorted.