• Advertisement
Sign in to follow this  

Viewport maxZ = 0 question

This topic is 2831 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

I have a 3D arrow mesh (cylinder + cone) that I use to indicate light direction. I want this to always be visible, so I tried setting the MinZ = MaxZ = 0 in the viewport transformation and it works well. However, after thinking about it, I started questioning why it works. The arrow has overlapping triangles from some view angles, so shouldn't this cause some sort of Z-fighting since both pixels will have a z = 0 from this viewport transform? But rotating the arrow and viewing from all angles, there is no problem. It almost seems like it does the depth test first (with z values before flattening from the viewport transform), and then flattens to z = 0 from the viewport transform. I am using Direct3D 9. Any explanation?

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement