[osg-users] how to get an unclamped float color buffer?

John Donovan john.donovan at embryonicstudios.com
Thu Oct 25 08:43:48 PDT 2007

Ralph Kern wrote:
> Hi,
> I now managed to get true float values out of the render buffer by
> specifying
>>> 	image = new osg::Image;
>>> 	image->allocateImage(width, height, 1, GL_RGB, GL_FLOAT);
>>> 	image->setInternalTextureFormat(GL_RGB32F_ARB);
>>> 	viewer->getCamera()->attach(osg::Camera::COLOR_BUFFER, image.get());
> But the values are still clamped to 1.0. Any idea to get around that?
> regards Ralph

A fragment shader is what you need I think. Make sure you write to gl_FragData
rather than gl_FragColor, otherwise it'll still be clamped.
I'm a bit busy at the moment, so I can't help you further, but I'm sure others
will be generous with their time :)


This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 

More information about the osg-users mailing list