z buffer - getting the z values of triangles
hi,
i have an array with triangles.
now i want to implement a z-buffer.
my question is now, how can i get the z value for every pixel of every triangle? the triangles contain of three vertexes, every vertex has a x, y and z value.
i also do a perspective projection of my triangles and get a u and v value for all three triangle vertexes on the screen.
do i need the u and v values for the calculation or only the x,y,z values?
would be nice if someone can give me a formula to calculate the z value of my triangles.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement