Hi, Thanks for the responses. I missed all the calls you mentioned (configure shadow comparison, func, and mode). I am surprised I missed these when looking through the OSG shadow code.
I am setting the internal format GL_DEPTH_COMPONENT but I noticed last night that gDebugger list the texture type as RGB, so I might have a bug in my Java bindings to OSG. Thanks for the suggestions. Cheers, Brad -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Wojciech Lewandowski Sent: Friday, 8 July 2011 5:59 AM To: OpenSceneGraph Users Subject: Re: [osg-users] GLSL shadow2D / shadow2DProj question 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 [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 ------------------------------------------------------------------------- DISCLAIMER: This e-mail transmission and any documents, files and previous e-mail messages attached to it are private and confidential. They may contain proprietary or copyright material or information that is subject to legal professional privilege. They are for the use of the intended recipient only. Any unauthorised viewing, use, disclosure, copying, alteration, storage or distribution of, or reliance on, this message is strictly prohibited. No part may be reproduced, adapted or transmitted without the written permission of the owner. If you have received this transmission in error, or are not an authorised recipient, please immediately notify the sender by return email, delete this message and all copies from your e-mail system, and destroy any printed copies. Receipt by anyone other than the intended recipient should not be deemed a waiver of any privilege or protection. Thales Australia does not warrant or represent that this e-mail or any documents, files and previous e-mail messages attached are error or virus free. ------------------------------------------------------------------------- _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

