Hi Harash, floating point formats are not available for all pixel formats. Have a look at the OpenGL specs/extension registry on the topic of float textures to see what floating point formats are supported.
Robert. On Fri, Oct 17, 2008 at 8:28 AM, Harash Sharma <[EMAIL PROTECTED]> wrote: > Hi all, > > I am facing a problem in accessing the floating point texture within a > fragment shader. I have some 2D floating point array that I wish to access > within the Fragment Shader. For the purpose, > 1. I have created an image with the pixel format GL_LUMINANCE and data type > of GL_FLOAT. > 2. The Array data is copied to the Image data array. > 3. The image is bound to a texture and this texture passed as uniform to the > Fragment Shader. > > The output is a totally white screen. > > However, if I modify the Pixel format to GL_RGBA and the datatype to > GL_UNSIGNED_BYTE and convert the values to integer and split the 4 bytes of > unsigned int into R,G,B,A, I am able to reconstruct the values within the > shader and process the fragment accordingly. > > I am using nVidia Quadro Fx 4500 graphics card on Intel Xeon 5160 processor. > > Please Guide > > Regards > > Harash. > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

