I understand your believe / assumption. Unfortunately a believe without backup is just that. The “problem” is we keep assuming. When I asked about it, @hunterk answered sRGB space is NOT set on RA’s side. ( https://forums.libretro.com/t/dogways-grading-shader-slang/27148/375 ) . Dogway who is pretty well versed in color theory has also been forced to make assumptions, because there are no clear answers. And without clear answers, we could be dead wrong on the correct gamma adaption for Vintage CRT ouput to emulating that on our current LCD sRGB monitors.
Why is the above relevant? Because gamma mismatch affects the shape of the Gray-Scale and it has a major impact on not only image brightness and contrast, but also on hue and color saturation! In other words a gamma mismatch cause the intention and vision of the gfx artists of vintage games to be lost.
So just to entertain, the following are my observations.
The Poynton paper says the native gamma of CRT is power gamma with y between 2.35 to 2.55. (Remember gamma of 2.2 on PVM’s is NOT native CRT gamma, it is engineered for studio purposes). Let’s assume a specific value 2.5:
I.e. Brightness = (normalized luminance value) ^ 2.50
Poynton notes that the brightness perception of the human eye is approximately the inverse of the CRT power function. He doesn’t go into details but if you search for this, the theory is there is roughly a “dark adapted” and “bright adapted” eye. It depends on whether you’ve been sitting for an half hour or longer in a dim surround room (dark adapted) or well lighted room (bright adapted) and both can roughly be described by these functions:
Dark adapted eye : Perceived brightness = (normalized luminance value) ^ 0.4
Bright adapted eye: Perceived brightness = (normalized luminance value) ^ 0.5
As you’ll quickly see the dark adapted eye is exactly the inverse function of a CRT gamma function (1/0.4=2.5).
So suppose most games were developed in dim surround (game developers loved working at night ).
Conclusion / Assumption 1: : In the 80’s and 90’s there was NO layer that did gamma encoding. The eyes response is approximately the inverse of a CRT gamma function. So the perception end-to-end is completely linear. It was indeed a fortunate coincidence as poynton notes indeed!
So that’s the theory on CRT, now to our emulation chain:
Our eye’s response is still the same as it was in the 80’s / 90’s: Dark adapted eye : Perceived brightness = (normalized luminance value) ^ 0.4
But HEY something did change. Our current monitors DON’T have a 2.5 CRT power gamma. No they have an “average gamma” of 2.2 mostly?
Conclusion / Assumption 2: For 80’s and 90’s vintage system there’s a mismatch in emulated color luminance for R, G and B, because Vintage CRTs were at Power gamma 2.35 to 2.55 and our current LCD monitors are at gamma 2.2 average.
Conclusion / Assumption 3: emulated vintage games from the 80’s and 90’s on Retroarch have a color luminance mismatch on R, G, and B that at worst is 2.55/2.2= 1.16 times too bright, or least worse 2.35 / 2.2 = 1.07 times too bright.
Since gamma mismatch affects the shape of the Gray-Scale it has a major impact on not only image brightness and contrast, but also on hue and color saturation! There’s a noticable mismatch between what the CRT game developer saw on his screen in the 80’s and 90’s and what we are now seeing through emulation. It gets borked!
So now tell me how we adapt for this difference in the emulator chain?
- Retroarch should do no gamma encoding in the gfx output anywhere. Who can confirm this is really the case?
- If 1: then the shader output should be calibrated when using -at least- a gamma correction of 2.35/2.2=1.07. (In current development version of guest-venom this means a “gamma correction” that’s actually the inverse value 1/1.07, so a setting for “gamma correction” by default of 0.935 or lower to be accurate for 80’s and 90’s vintage games, when displayed on an LCD monitor with 2.2 gamma.) Right?
- If not 1: Who knows where the gray scale curve gets ripped by some gamma correction nobody can tell what it actually is? Again we shouldn’t settle for believe or assumption here, someone with authority on RA’s core code should be able to confirm.
So who else finds it useful to get to the bottom of this?