Interesting. I changed ShadowMap's clamping to CLAMP_TO_BORDER some time ago
to eliminate seeing the "square" of the shadow map texture on the base
geometry, which occurred when CLAMP_TO_EDGE was used (the shadow map did not
contain an edge, so it defaulted to black, producing a shadow for any
geometry outside the area covered by the shadow map).

To me, it seems incorrect for the algorithm to use the same texture clamping
for both the shadow texture and the scene model textures. Shouldn't it use
whatever the user has specified for clamping for the model textures? Then it
would use CLAMP_TO_BORDER for the shadow map texture.
   -Paul


> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Jean-Sebastien Guay
> Sent: Tuesday, January 15, 2008 9:38 AM
> To: OpenSceneGraph Users
> Subject: Re: [osg-users] What changed with ShadowMap in 2.3.x?
> 
> Hello Robert and Paul,
> 
> > The question has to be why the highlight in the center and dark 
> > corners.. my guess this the shaders lighting model being somewhat 
> > screwed when handling coarsely tessellated objects, that's just a
> > guess though.   I'd suspect this issue might have been in 
> there in the
> > first place but hidden by the incorrect lighting settings.
> 
> I bumped into this issue as well yesterday, and it's caused 
> by incorrect texture wrapping modes set on the fake texture 
> that is used by ShadowMap to be able to use the same shader 
> with both textured and non-textured objects.
> 
> Setting the wrapping to CLAMP_TO_EDGE or REPEAT instead of 
> CLAMP_TO_BORDER solved it for me. (which one is correct in 
> this case? it doesn't really matter whether it's stretched or 
> repeated...)
> 
> Since it's a simple 1x1 white texture, I guess using 
> CLAMP_TO_BORDER would make it try to blend into black (by 
> default) borders, which caused the visual result we were getting.
> 
> J-S
> --
> ______________________________________________________
> Jean-Sebastien Guay     [EMAIL PROTECTED]
>                         http://whitestar02.webhop.org/ 
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce
negraph.org

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

Reply via email to