Hi, Benoit. Yes there is a kind of clamp. 16 Bit float values can only represent values upto 65504. Thus it is a good practice to add something like:
color = min(color, 65504); At the end of your shaders. See nVidia's FP_Specials.pdf for more info. Cheers, Art --- Benoit bossavit <[EMAIL PROTECTED]> schrieb: > 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 > ________ Yahoo! Clever: Stellen Sie Fragen und finden Sie Antworten. Teilen Sie Ihr Wissen. www.yahoo.de/clever _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org