Hi Wojtek,

All your math seems correct to me. I would use ( lightSpaceDepth * 0.5 +
0.5 ) to compare with shadow map. But you said you tried it.

Yes, * 0.5 + 0.5 seemed "more correct" but still only seemed to use the
first part of the possible range, so I think you're right that one of my
matrices is probably not set correctly. I'll investigate this.

I wonder: Is it possible that the depth range given by the shadow camera's projection matrix doesn't match the depth range in the shadow map? I assumed that since that same camera renders to the shadow map, the depth range should be the same, but is it possible it doesn't match?

Because the values I get for light-space main pass fragment depth seem to increase when they get further from the light, as they should, but they're just not in the right range.

I think I'll make a small example program to show it and see if you can spot the error more clearly then.

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

Reply via email to