zhangzdb / osgocean

Automatically exported from code.google.com/p/osgocean
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Artefacts on edge of screen #43

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hy I want use osgOcean in cloud rendering.
On left ,right and down edge is water without reflection it is maximum 4 pixels 
and it is changing and when I join together frames from other computers I get 
(no reflection) lines on total frame.  I think it can be issue with water 
shader or... can you repaire it ? 

Ferry

Original issue reported on code.google.com by jacko...@gmail.com on 7 Apr 2013 at 1:29

GoogleCodeExporter commented 9 years ago
osg::Texture2D* OceanScene::createTexture2D( const osg::Vec2s& size, GLint 
format )
{
    osg::Texture2D* texture = new osg::Texture2D;
    texture->setTextureSize(size.x(), size.y());
    texture->setInternalFormat(format);
    texture->setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LINEAR);
    texture->setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LINEAR);
    //texture->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP );
    //texture->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP );
    texture->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_EDGE );
    texture->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_EDGE );
    texture->setDataVariance(osg::Object::DYNAMIC);
    return texture;
}   

repair it 

Original comment by jacko...@gmail.com on 7 Apr 2013 at 1:56