Jump to content
  • Advertisement
Sign in to follow this  
carew

Z Pass

This topic is 3366 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'm looking for the best method of first, quick pass - Z-Pass. Current I do it: 1 . - Disable color write - Enable write to Z-Buffer - Render scane - Disable write to Z-Buffer - Enable color write 2. - Render scene with shaders (pixel shader executing is short, because many pixels are rejested in first Z-Pass) Can do this pass in other, best way? Eg with usage shaders in "1." Z Pass?

Share this post


Link to post
Share on other sites
Advertisement
No, this is basically the best way. Rendering with color writes turned off will actually make things render much faster on many cards (they get higher fill rate if you're only rendering depth). The whole idea is to have your Z buffer filled in so that your shaders don't run on as many pixels, so you can't really do it in one pass.

Is there a specific problem that you're having, or are you just wondering about alternatives?

Share this post


Link to post
Share on other sites
Yeah, what you're doing there is fine. Just make sure for your Z-only pass you use as simple a shader as possible.

Share this post


Link to post
Share on other sites
Hey, I don't want to toss this thread OT but I'm a generic game programmer with very little knowledge of graphics programming issues (such as this one)

anyone know any good books?

(again sorry for going OT but this is the exact kind of thing i am trying to learn more about)

Share this post


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

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!