mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-23 10:20:48 +00:00
Merge branch 'one-am-sunday-night-shadows-mr' into 'master'
Use CLAMP_TO_EDGE for shadows See merge request OpenMW/openmw!4065
This commit is contained in:
commit
e00f643d08
@ -558,11 +558,9 @@ MWShadowTechnique::ShadowData::ShadowData(MWShadowTechnique::ViewDependentData*
|
||||
_texture->setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LINEAR);
|
||||
_texture->setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LINEAR);
|
||||
|
||||
// the shadow comparison should fail if object is outside the texture
|
||||
_texture->setWrap(osg::Texture2D::WRAP_S,osg::Texture2D::CLAMP_TO_BORDER);
|
||||
_texture->setWrap(osg::Texture2D::WRAP_T,osg::Texture2D::CLAMP_TO_BORDER);
|
||||
_texture->setBorderColor(osg::Vec4(1.0f,1.0f,1.0f,1.0f));
|
||||
//_texture->setBorderColor(osg::Vec4(0.0f,0.0f,0.0f,0.0f));
|
||||
// the shader clips sampled coordinates, so no need for border
|
||||
_texture->setWrap(osg::Texture2D::WRAP_S,osg::Texture2D::CLAMP_TO_EDGE);
|
||||
_texture->setWrap(osg::Texture2D::WRAP_T,osg::Texture2D::CLAMP_TO_EDGE);
|
||||
|
||||
// set up the camera
|
||||
_camera = new osg::Camera;
|
||||
|
Loading…
x
Reference in New Issue
Block a user