Hi,
I worked alot with opengl 8 bit per channel formats (which are clamped from 0-1 as far as I know) and also with floating point formats like GL_RGB16F_ARB. I am sure that the ranges there are not clamped and should be somewhat from - biggest_possible_float to + biggest_possible_float. Anyways here is what I don’t understand. Does that mean that - biggest_possible_float becomes black and +biggest_possible_float becomes red/green/blue? Until now I still had the feeling that <= 0 was black and >= 1.0 was highest r/g/b. Maybe I am misunderstanding the concept of floating point formats in general, but where is the benefit in terms of color range if the colours are still clamped from 0-1 when they are displayed.
lets do a little example:
glTexImage2D(..., 0, GL_RGB8, 100, 100, 0, GL_RGB, GL_UNSIGNED_BYTE, myPixels);
then I would know, that a pixel channel with the value 0 would the smallest possible value, and 255 the biggest one.
glTexImage2D(..., 0, GL_RGB16F_ARB, 100, 100, 0, GL_RGB, GL_FLOAT, myPixels);
What is the smallest, what is the biggest possible value? As stated before i am pretty certain that it should be somewhat like -biggest_possible_float to +biggest_possible_float, but still why is everything smaller than 0 black, and everyting bigger or equal to one full red/green/blue?
I still understand the benefits of floating point textures for other things like HDR or other more precise calculations in a shader. The reason I am trying to figgure this out right now is that I am working on a simple colour class in c++ that should similarily handle different internal formats.
Thanks!
edit:
Okay, I just read a paper about openEXR, I think it’s defined beaviour that the range 0-1 is what todays displays can display and everything else is basically your processing margin, so you don’t loose anything after havy postprocessing?
Can anybody confirm that?