[osg-submissions] ShadowMap should CLAMP_TO_EDGE

Paul Martz pmartz at skew-matrix.com
Wed Sep 12 14:08:31 PDT 2007


Prior to this change, if the receiving geometry has texture coordinates
outside the 0..1 depth map range, the geometry is rendered with ~0.5 correct
intensity due to contribution from the (zero intensity) texture edge. With
this change, that geometry is rendered at the correct intensity.
 
You can see the problem in the osgshadow example if you hack the ModelThree
class to create a base/box with much larger horizontal extent.
 
This change was made based on the 2.0 source. However, if you need the
change based off of current source, just look for the two "CLAMP_TO_EDGE"
lines that I added, and add them to current source. It's a trivial change.
 
Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com <http://www.skew-matrix.com/> 
303 859 9466
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20070912/98d1e6aa/attachment.htm 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ShadowMap.cpp
Url: http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20070912/98d1e6aa/attachment.asc 


More information about the osg-submissions mailing list