Hi J-S,

The whole idea of optimal shadow map is implemented in a series of shadow camera projection adjustments. I saw you set up your ShadowCameraTransform uniform in StandardShadowMap::aimShadowCasting camera. This is initial setting of shadow cam matrices. MinimalShadowMap and derived techniques further refine these based on bounds computed in their specific way. This refinement may happen more than once in frameShadowCastingCamera method. So you should update ShadowCameraTransform inside these methods. This explains your observations that projection you read differs from projection used in practice.

Cheers,
Wojtek

-----Original Message----- From: Jean-Sébastien Guay
Sent: Wednesday, November 17, 2010 5:17 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Getting light-space depth of main pass fragment

Hi again,

If you don't mind, here is a small example I've put together to show
what happens.

Err, sorry, the example was missing some code for correct texcoords to
get the depth from the shadow map. Here is the corrected example.

I also changed it from DB to VB, and the result is still the same.

Thanks,

J-S
--
______________________________________________________
Jean-Sebastien Guay    [email protected]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/






_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to