Sign in to follow this  
pikebu

z buffer - getting the z values of triangles

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this