Hi all,

I'm trying to do a render in HDR with a CameraNode (osg1.2).
I have a texture where I set an Image wich contains float values :

    img->setImage( width, height, 1, GL_INTENSITY16F_ARB, GL_LUMINANCE,
GL_FLOAT, data, osg::Image::USE_NEW_DELETE );
    texture->setImage(img.get());
    texture->setFilter( osg::Texture::MIN_FILTER, osg::Texture::LINEAR );
    texture->setFilter( osg::Texture::MAG_FILTER, osg::Texture::LINEAR );
    texture->setWrap( osg::Texture::WRAP_S, osg::Texture::CLAMP );
    texture->setWrap( osg::Texture::WRAP_T, osg::Texture::CLAMP );


In data I put values between 0.0 and 70000.0
I give this texture to my shaders and I project it with glsl function
texture2DProj().
I have an artefact with the render (after tone mapping). Values upper than
65510 (not 65536) seems wrong.
It's possible there is a max for float value with texture 16 bits ? and
these max is "the same" that integer value? the rest of values or good, I
can obtain for exemple a value like 25630.56.

Someone can see something?

thanks you.

bnua
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to