Hi Brad,

Did you forget to call
       texture->setShadowComparison(true) ?

Its neccessary for shadow2D and shadow2DProj to work.

setShadowComparison( true ) is equivalent to OpenGL:
glTexParameteri( TextureId , GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB );

Cheers,
Wojtek

-----Oryginalna wiadomość----- From: Paul Martz
Sent: Thursday, July 07, 2011 7:13 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] GLSL shadow2D / shadow2DProj question

On 7/7/2011 11:02 AM, Paul Martz wrote:
According to the GLSL spec, results from shadow2D and friends is undefined if
the texture is not a depth format.

Another thought is what version of GLSL you're invoking. If you use shadow2D() to sample the texture, that's good for GLSL 1.20, but is deprecated in 1.30 and beyond (in which you simply use texture2D() to sample the texture, even if it's
a shadow texture).
   -Paul

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to