Hello Wojtek, Adrian,

Lets imagine following case: suppose that such the same light will get used by lighting and shadow computation. It may bring some discrepancies if happens to be preceded by some trransformation. When used with lighting it will be premultiplied by inverse model view but when used by shadowing it will be not premultiplied. So the lighting direction and shadow casting direction may get out of sync. Using this properly would require some knowledge and discipline from user. But it may be still worth adding. I would be grateful If Robert or others could join this discussion and say what they think.

Personally, I think the lighting computations for shadowing should be the same as for any other OpenGL application. A light source is positional state, you can't just assume it will always be at the top of your graph with no transforms above it.

Even if it might be a valid assumption in one case, it's not in general because as Wojtek says, if you ever have the case where there is a transform above the light source (which is also perfectly valid from an OpenGL standpoint) then the scene lighting and shadows won't match.

I think PSSM should be fixed to handle this correctly. At a minimum, any such assumptions should be well documented instead of having to read the code to find out...

J-S
--
______________________________________________________
Jean-Sebastien Guay    [EMAIL PROTECTED]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to