From Gino, "According to the 1.4.1 COLLADA spec (2nd ed) the standard behavior for fx_sampler_wrap_common is as follows

CLAMP ->GL_CLAMP_TO_EDGE
NONE->GL_CLAMP_TO_BORDER

The current 2.5.0 daePlugin assumes the following binding

CLAMP ->GL_CLAMP
NONE->GL_REPEAT

Notably the GL_CLAMP binding will result in visible black seams on input files that use otherwise matching textures. Replacing GL_CLAMP by GL_CLAMP_TO_EDGE solves this problem. I've updated both the read and write functions.
"
This commit is contained in:
Robert Osfield
2008-05-26 21:32:05 +00:00
parent ee6f055bc5
commit 8f6ca1dc6c
2 changed files with 7 additions and 7 deletions

View File

@@ -126,10 +126,10 @@ void daeWriter::processMaterial( osg::StateSet *ss, domInstance_geometry *ig, co
switch( wrap )
{
case osg::Texture::CLAMP:
case osg::Texture::CLAMP_TO_EDGE:
wrap_s->setValue( FX_SAMPLER_WRAP_COMMON_CLAMP );
break;
case osg::Texture::CLAMP_TO_BORDER:
case osg::Texture::CLAMP_TO_EDGE:
wrap_s->setValue( FX_SAMPLER_WRAP_COMMON_BORDER );
break;
case osg::Texture::REPEAT:
@@ -148,10 +148,10 @@ void daeWriter::processMaterial( osg::StateSet *ss, domInstance_geometry *ig, co
switch( wrap )
{
case osg::Texture::CLAMP:
case osg::Texture::CLAMP_TO_EDGE:
wrap_t->setValue( FX_SAMPLER_WRAP_COMMON_CLAMP );
break;
case osg::Texture::CLAMP_TO_BORDER:
case osg::Texture::CLAMP_TO_EDGE:
wrap_t->setValue( FX_SAMPLER_WRAP_COMMON_BORDER );
break;
case osg::Texture::REPEAT: