[osg-users] how to get an unclamped float color buffer?
usenet04 at rk-se.de
Thu Oct 25 08:50:49 PDT 2007
John Donovan schrieb:
> Ralph Kern wrote:
>> I now managed to get true float values out of the render buffer by
>>>> image = new osg::Image;
>>>> image->allocateImage(width, height, 1, GL_RGB, GL_FLOAT);
>>>> 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 :)
Thanks, you're right. Writing to gl_FragData in the fragment shader
gives unclamped results in my setup.
More information about the osg-users