• Advertisement
Sign in to follow this  

Shadow mapping - formats

This topic is 4262 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 have a two questions about my shadow mapping, which I am basing on the great PSSM demo from Image of the Day (which is running fine on my PC). I am trying to implement the same system in my app, but am getting abit confused now. I have had to make a few mod which I think may be causing (one of) my problems, like adding world space transformation to the shaders, no big deal? In the demo, the preview quads are yellow with a green background. In mine, they are cyan and white. Does this suggest I am using the wrong format? I think I am using D3DFMT_D24S8 for the depth stencil and D3DFMT_R32F for the render target. Thanks for your advice Simon

Share this post


Link to post
Share on other sites
Advertisement
I'm not too sure about that demo as I've not looked at it in detail (it is on my extremely long list of things to check out)...

Quote:
Original post by sipickles
In the demo, the preview quads are yellow with a green background. In mine, they are cyan and white. Does this suggest I am using the wrong format?
R32F will generate a white<->cyan gradient due to the default channels being 1.0... if R=0 you get (0,1,1) = cyan or (1,1,1) = white [smile]

To get yellow (1,1,0) and green (0,1,0) it could still be R32F but with a different default for the blue channel. Which doesn't make much sense as only D3DFMT_A8 has 0 defaults - everything else is 1...

Without any more details on the code (or if there are any shaders influencing hows it written out) its difficult to say.

You could also try asking the author - his email address is at the bottom of this page [smile]

hth
Jack

Share this post


Link to post
Share on other sites
White-cyan should be right. The preview is just colored in the demo.

Share this post


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

  • Advertisement