3 ms·
What about gamma in rendering pipelines that use floats for high dynamic range?
by bruce343434 5y ago
What about gamma in rendering pipelines that use floats for high dynamic range?
- auggierose 5y agoIn an ideal world, why would you use gamma there? Especially in a rendering pipeline using vectors (= linear) is better. And floats give you the range and precision you need. If you use CIE XYZ instead of CIE RGB, then the Y channel corresponds to luminosity, a float value for luminosity should cover any range any hardware can handle.
- bruce343434 5y agoYou'd use gamma to convert it to the limited rgba8888 scheme. Or maybe with hdr monitors some sort of 10 or 12 bit scheme. Either way you'll need to cut out information, because a light with value 1029 and a shade with value 3 in the same picture won't bode well without some gamma correction and cutoff.
- auggierose 5y agoWhy would you not just let the output hardware handle that sort of stuff? It really depends on the hardware what it can output and what not.
- bruce343434 5y agoHow does the hardware know what I want to adjust my range for?
- auggierose 5y agoWell you don't want to adjust your range, you give it the actual values. The hardware then does its best to show them. Anything else would be image processing, which is fine, but I don't see why you would need "Gamma" for that.
- kaetemi 5y agoBack and forth sRGB conversion is builtin to the texture sampling and frame buffer output pipelines.
- msk-lywenn 5y agoGamma is about outputting to the monitor. HDR or not, the pipeline should be linear and the output converted to whatever the display needs.
- bumbada 5y agoYou don't need gamma when you have floats. We use gamma in order to emulate human sensibility that is logarithmic, lot linear. Most machine sensors work in the linear space, they are either linear or linearized around a specific point(like most cameras). Human senses adapt continuously to the strength of the signal. Your eardrum has muscles that become more rigid with loud sounds and decouple it. Your eyes have pupils that contract and let much less light to pass. Half pupil's diameter means 4 times less light, not linearly but as a power of two. Then the sensors itself reduce the signal again. If you look at a bright thing in sunlight for two seconds and then look away you see a "shadow" of the bright object because the specific part of the retina has adapted to the level of sunlight and automatically subtracts the brightness in this region. Neurons itself work logarithmically. The hairs in the ears reacts proportionally less than the signal itself. The chemical diffusion of to cells is also proportional to itself. That is they work in the logarithmic (or the inverse, exponential if you want to recover the original signal). The reason float works is because float encoding is logarithmic. But there is a problem, 16 float bits is not standard and it is very limited. You need 32 bit floats per image channel and that is wasteful. Adobe raw format(dng) created a 16 bit float. But if you do something, do it well, use 32 bits like the Gimp does. The great thing about 32 bits is that you could combine multiple exposures in a single image and that way you are not wasting so much resources because instead of 3 or 4 pictures(each for a different exposure), you just have one with almost the same info.