Hello all,

If I were to set the color of a vertex of an osg::Node using floats between 0-1 
and then accessed the color of that same vertex in a GLSL shader, would I get 
back the exact same floating point value?  I am worried that at some point in 
the pipeline that float would be scaled to an 8 bit unsigned int between 0-255 
and then rescaled back to a 0-1 float when accessed using GLSL.  The reason I 
ask is that I am hoping to use the floating point value to carry a scaled index 
number for a lookup table in the shader instead of a color, so precision would 
be important.

I know this is an OpenGL pipeline question and I am actively reading OpenGL 
documentation to get my head around this stuff in general but a quick answer to 
this particular question would be very much appreciated, especially since I 
can't do any debugging on the shader to verify this one way or another.  Thanks,

-Ethan

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=46035#46035





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to