Hi,

This patch includes two things:

1.)     The polygon offset was hard-coded and I somehow had
        troubles overwritting this state deeper in my shadowed scenes.
That's why I've added getter/setter methods for the polygon offset (saves trouble with nvidia and recent ati drivers ;-))

2.) Introduced 2 methods (setDone, setOneShot) to allow (re)sampling of the shadow map when desired. The oneshot-method can be thought as setting the shadow-sampling to a special mode, where the 'done' flag is actually taken into account. The done flag indicates if sampling has to be done for the current traversal. By resetting the 'done' one can force resampling of the map. (I use this since my scene and lights are static for a big number of frames but may change any time)

        I'm new to osg and I wonder if this could be done a little more
intelligent ( I guess this should be done by changing the culling traverse strategy somehow ...)

Please give me some feedback on this. I have some more ideas/improvements.

P.S. I developed some kind of Unified Shader for per-pixel lighting with
optional shadowing that supports different lightsources ( effectively by using the glsl-preprocessor). Do you think that might be usefull to anyone?

cheers
Sebastian 'psy' Messerschmidt


Attachment: osg_shadowMap_patch_psy.rar
Description: Binary data

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

Reply via email to