[osg-users] ShadowMap problem...
jean-sebastien.guay at cm-labs.com
Wed Nov 11 12:32:51 PST 2009
> With the debugHUD in the ShadowMap example, there was just
> a window which appeared to display the shadow map in gray-scale, but in the
> LISPSM example, there appears to be two sub-windows in the debughud window
> (not in gray-scale). What are these displaying?
The left side is the shadow map itself, and the right side is a render
of the bounds analysis render pass (the LightSpacePerspectiveShadowMapDB
technique - Draw Bounds - makes a 64x64 render pass before the actual
shadow pass to see if the shadow map bounds can be further reduced -
Wojtek can tell you more about it, or search the archives for details).
> Am I supposed to, basically, copy the shader code from StandardShader map
> and add it to my shaders and turn off the LISPSM shaders?
You only need to use some parts, those that relate to the shadow test.
The rest of your shader can be what you want - most of the shader code
in StandardShadowMap.cpp is just standard lighting, which you might be
doing differently. You should copy the DynamicShadow function for both
vertex and fragment shader (whether you want to keep it in a function or
not, up to you) and then look at the place where it's used and do
Read the shaders, you should understand.
Jean-Sebastien Guay jean-sebastien.guay at cm-labs.com
More information about the osg-users