Anyway Panda can have support for floating point textures in the near future? It seems that in order to use 2d textures in Cg they have to be floatibg point. And while there is support for this OpenGl, its at a lower level than Panda lets us control.
I believe that all textures are automatically converted to floating point for processing in the fragment shader. For example, a 24-bit RGB texture is converted into a 2D array of float3, at least from the perspective of the shader.
Is there anyway to clamp those values to be between 0 and 1?
The values stored in textures are always between 0 and 1.
Shader Model 3 supports 16bit textures. There’s a post in the forum about how to access them. Certain settings of graphics cards cause problems when you don’t clamp the output color to 1.
Use saturate(o_color) to do clamp the color.