Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Clamping Z with ProcessVertices

This topic is 5677 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 all, I need to render a model, but I need all Z buffer comparisons to ''pretend'' like they''re all the value of the highest vertex in the model. To the point: I want my model to Z clip based ONLY on its highest point. The only way I can think of to do this is to run the whole model through processvertices to transform and light it, then lock the vertex buffer and manually set the z position of each vertex. Am I missing something? Is there an easier way to do this? I''m concerned about the speed of that method. Goodlife -- Goodlife ----------------------------- Those whom the gods would destroy, they first drive mad. --DirectX design team official motto

Share this post


Link to post
Share on other sites
Advertisement
Oh man, you guys are killing me! Ask a simple question-- ANY question-- and the answer is "why you wanna do dat?"

Anyway, for anyone who cares, you can clamp Z in DirectX by setting the minz/maxz values in D3DVIEWPORT8 to be the same value.

Share this post


Link to post
Share on other sites
If you use a vertex shader when you render it you can use any formula you like to determine the z value. But it sounds like your confused on something you doing.

Share this post


Link to post
Share on other sites

  • 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!