Comment by Animats

1 day ago

This is part of "tone mapping"[1] in high dynamic range rendering. The idea is that pixels are computed with a much larger range of values than screens can display. 16 bits per color per pixel, or even a floating point value. Then, to generate the displayed image, there's a final step where the pixel values are run through a perceptual transformation to map them into 8 bit RGB (or more, if the hardware is is available.)

This has issues. When you go from a dark space to a bright space, the eye's iris stops down. But not instantaneously. It takes a second or two. This can be simulated. Cyberpunk 2077 does this. Go from a dark place in the game to bright sunlight and, for a moment, the screen becomes blinding, then adjusts.

In the other direction, go into a dark space, and it's dark at first, then seems to lighten up after a while. Dark adaptation is slower then light adaptation.

Tone mapping is not just an intensity adjustment. It has to compensate for the color space intensity problems the OP mentions. Human eyes are not equally sensitive to the primary colors.

Some visually impaired people hate this kind of adjustment, it turns out.

Here's a clip from Cyberpunk 2077.[2] Watch what happens to screen brightness as the car goes into the tunnel and then emerges into daylight.

[1] https://en.wikipedia.org/wiki/Tone_mapping

[2] https://youtu.be/aWlX793ACUY?t=145

Could this be the reason I immensely dislike when webpages include blocks of inverse background/text, or generally combine light-text-on-dark with dark-text-on-light elements?

> Here's a clip from Cyberpunk 2077.[2]

This looks nothing like actual Cyberpunk 2077. It looks actually realistic - unlike the base game itself where, just like in about every other game since "Physically Based Rendering" became a thing, everything looks like it's made of painted plastic.

Per the video description, this version of C2077 is modded up to its eyeballs. I'm very interested in those mods now, because it's the first time I ever saw someone managed to get materials in a game look somewhat realistic.

> Cyberpunk 2077 does this. Go from a dark place in the game to bright sunlight and, for a moment, the screen becomes blinding, then adjusts.

Or, very famously 20 years ago in Half-Life 2: Lost Coast, which was released as a tech demo for HDR rendering.

this is why Google's HCT color space has both a Tone as adjustment and device environment as a color adjust.