Hi osgUsers,

I've been doing some testing on HDR with a backdrop with a .hdr image
using osg::Texture2D for the backdrop works great.. really nice HDR effects.

using osg::TextureCubeMap results with textures loosing values over 1.0
and resulting with a rainbow effect of colors in those areas

in short:

this doesn't work:
        osg::TextureCubeMap* texture = new osg::TextureCubeMap;
        osg::Image* pImage = osgDB::readImageFile("vinesunset.hdr");
        
        texture->setInternalFormat( GL_RGB16F_ARB );
        texture->setResizeNonPowerOfTwoHint(false);

        texture->setImage( 0, pImage );
        texture->setImage( 1, pImage );
        texture->setImage( 2, pImage );
        texture->setImage( 3, pImage );
        texture->setImage( 4, pImage );
        texture->setImage( 5, pImage );

this works:
        osg::ref_ptr<osg::Texture2D> texture = new osg::Texture2D(
osgDB::readImageFile("vinesunset.hdr") );
        texture->setInternalFormat( GL_RGB16F_ARB );
        texture->setResizeNonPowerOfTwoHint(false);

        texture->setImage( pImage );

can anyone spot what I'm missing?

-- 
Regards,
Peter Wraae Marino

www.osghelp.com - OpenSceneGraph support site
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to