[osg-users] Float textures seem to be clamped in GLSL

David Spilling david.spilling at gmail.com
Wed Mar 4 15:06:09 PST 2009


My initial thought was that nowhere were you saying that the image was
floating point. Digging further, I realised that TransferFunction should be
doing it for you - I've never used this before - but this line (in
osg/TransferFunction1D.cpp) looks a little odd to me:

    _image->setImage(numX,1,1,GL_RGBA, GL_RGBA, GL_FLOAT, (unsigned
char*)&_colors[0], osg::Image::NO_DELETE);

Shouldn't that be "GL_RGBA32F_ARB,GL_RGBA, GL_FLOAT"?

I guess also doing a texture1D->setInternalFormat(GL_RGBA32F_ARB) might
help, but I think (without looking at the code) that osg probably picks this
up from the image format anyway.

Hope that helps.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20090304/696a70b4/attachment-0003.htm>

More information about the osg-users mailing list