[osg-users] Shadow techniques status

Jean-Sébastien Guay jean-sebastien.guay at cm-labs.com
Wed Jul 30 05:31:32 PDT 2008


Hello Jim,

> ShadowMap does suffer from bad aliasing when the viewpoint is very
> near the shadow.
> The Orange book (GLSL shader) describes how to super-sample
> the depth buffer to mitigate aliasing.

Indeed, aliasing is a big problem with "vanilla" shadow mapping in 
almost all real-world cases.

What you describe can easily be done by client code, using the 
osgShadow::ShadowMap::clearShaderList() and 
osgShadow::ShadowMap::addShader() methods with the appropriate shaders. 
One thing that you need to be careful about when replacing the default 
shaders is to use the same uniform names to access the shadow map 
sampler and other variables.

J-S
-- 
______________________________________________________
Jean-Sebastien Guay    jean-sebastien.guay at cm-labs.com
                                http://www.cm-labs.com/
                         http://whitestar02.webhop.org/



More information about the osg-users mailing list