Sign in to follow this  
carew

Z Pass

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this