Jump to content
  • Advertisement
Sign in to follow this  
Adaline

[DX10] Shadow maps : SetPixelShader(NULL) and Alpha test

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

Hello

I'm getting information on cascaded shadow maps,
and I would like to set the pixel shader to NULL because I want to manipulate directly the z buffer as a shadow map.

Is there a way to enable alpha test with the pixel shader set to NULL ? (Actually, I make the alpha test with a 'discard' when textureColor.a=0 in a pixel shader)

Thanks in advance wink.gif

Share this post


Link to post
Share on other sites
Advertisement
Thank you Erik smile.gif

That's what I thought, I'm afraid .... I just wanted to be sure.
So I will use another texture as the render target ..... and a pixel shader sad.gif

Share this post


Link to post
Share on other sites

Thank you Erik smile.gif

That's what I thought, I'm afraid .... I just wanted to be sure.
So I will use another texture as the render target ..... and a pixel shader sad.gif


Hi,

you may still just write to z-buffer and disable color writes even if you use pixel shader.

For objects using alpha transparency I use a pixel shader to discard the transparent pixels and for fully opaque objects I disable pixel shader. No color buffer is needed, just the z-buffer.

Cheers!

Share this post


Link to post
Share on other sites

[quote name='NicoLaCrevette' timestamp='1318578597' post='4872438']
Thank you Erik smile.gif

That's what I thought, I'm afraid .... I just wanted to be sure.
So I will use another texture as the render target ..... and a pixel shader sad.gif


Hi,

you may still just write to z-buffer and disable color writes even if you use pixel shader.

For objects using alpha transparency I use a pixel shader to discard the transparent pixels and for fully opaque objects I disable pixel shader. No color buffer is needed, just the z-buffer.

Cheers!
[/quote]

It really helps me, thanks ! I think I will try to do the same rolleyes.gif

Share this post


Link to post
Share on other sites
Hi,

glad to be helpful. Just to clarify : by [color="#1c2837"][size=2]disabling color writes I mean that you should set your render target to NULL.
[color="#1c2837"][size=2]

[color="#1c2837"][size=2]Cheers!

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!