[osg-users] problem with HDR, values clamped?

Benoit bossavit bnuaster at gmail.com
Fri Sep 21 01:03:01 PDT 2007


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070921/b12eea55/attachment-0002.htm>


More information about the osg-users mailing list