I’m writing a custom shader for procedural terrain generation and I’m wondering if there is a way to access all three vertex positions of a triangle in the fragment function? This can be done by using uvs to gain access to the triangle vertices but that seems kinda cumbersome and there should be an easier way.
instead of passing uvs you pass vertice positions again so that you have access to them. This works as long as you don’t need the uvs for something else.
yes, and the only data you have access to is the final position of the fragment and not the original vertex positions i’m trying to get access to. I was just wondering if there was a quick and easy way of accessing the original vertex positions, instead of using the uvs.