Jump to content
  • Advertisement
Sign in to follow this  
pikebu

z buffer - getting the z values of triangles

This topic is 4958 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement

This topic is 4958 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!