Hi Wojtek,
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.
Ah, I thought that was the final setting, since all derived classes called that method. Thanks for pointing out frameShadowCastingCamera().
> So you should update
ShadowCameraTransform inside these methods. This explains your observations that projection you read differs from projection used in practice.
Yes, that explains it. And it works, thanks a lot. Just to confirm, since both MinimalDrawBoundsShadowMap and MinimalCullBoundsShadowMap call MinimalShadowMap::frameShadowCastingCamera() and don't do anything to the camera's matrices after that, it should be safe for all variants to update the uniform in that method?
I tried it in DrawBounds and it seems OK, but I just want to be sure since I don't yet know the code that well.
Thanks again, 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

