Bob,

Its hard for me to imagine how one could get the effect of lightening instead of dimming. But maybe color material set in vertices (GL_COLOR_MATERIAL) may be involved somehow. This attribute is not handled by vertex shaders. But its handled by fixed pipeline.You may look at the shaders code ( stored inside osgShadow\src\StandardShadowMap.cpp ). All classed derived from StandardShadowMap (Lispsm included) may work bit differenet than other techniques because they define Vertex Shader. If your fixed pipeline lighting setup is different than what is assumed in SSM vertex shader we may see some issues not observable with other techniques (which only use Fragment Shaders). SSM vertex shader assumes that we have one light and separately compute and pass diffuse and ambient components to fragment shader. If ambient is passed separately, fragment shader may properly remove only diffuse component in shadowed areas keeping ambient untouched.

Cheers,
Wojtek

Cheers,
Wojtek
----- Original Message ----- From: "Bob Holcomb" <[email protected]>
To: <[email protected]>
Sent: Wednesday, April 08, 2009 2:34 AM
Subject: [osg-users] osgShadow and model alpha textures


Hello,

I'm adding osgShadow to an existing osg project and I'm getting some weird results with PSSM (Parallel Split Shadow Maps). They don't seem to be respecting the alpha channel of my model's texture. For example, I have helicopter model who's rotor system is represented by a quad and a texture of the blades which is mostly transparent. When rendering before adding osgShadow it looked fine. After adding osgShadow the translucent part is white (but the shadows projected on the ground look pretty good!). This only affects the items under the shadowedScene node, any geometry not under that node is rendered correctly.

I've also tried the Light Space Perspective Map technique and found that the self shadowing looks great, but the projected texture on the ground actually makes the ground lighter instead of darker. If anybody has any info on either of these issues I would also appreciate the help. Thanks!

Cheers,

Bob

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=9871#9871






--------------------------------------------------------------------------------


_______________________________________________
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