I'm doing a trick custom fragment shader, that I want to pass
floating point values to.
Unfortunately, it seems that the glTexture2D call clamps all
floating point texel values to the range from 0.0 to 1.0. Does
anyone know a way around this? (So I could send texel values of
-2.5, +3.6, -0.2, etc)
Also, it seems that all texel values are actually sent across to
the GPU texture memory as 8-bit values. For example, I tried making
an RGBA texture like this:
And all the short values are clamped between 0 and 32767, but only
the most significant 8 bits reach the texture memory on the GPU.
Resulting in values of 1000 and 1001 being equal in the fragment
shader. For this application, I need resolution greater than 8 bits
in my texel data. Trying the above with GLfloat data still only
sends an 8 bit quantised values to the GPU texture memory.
Some GPUs may not support float texture formats, in which case,
they'll convert to something that is supported. What hardware are
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden