<p>I doubt that per-pixel PHYSICAL brightness control is possible. Many computers still use LCD, which uses a single backlight which is spread by optical planes, so there is no per-pixel brightness. Even on LED computers it would be a nightmare to implement variable brightness in hardware.</p>
<p>One important thing to remember is that when you increase pixel brightness, the blacks will also get brighter. Therefore, gains in contrast due to per-pixel PHYSICAL brightness control may not be predictable.</p>
<p>If you somehow find any hardware that provides a win32 or similar API for per-pixel PHYSICAL brightness, I doubt it will port to any commonly used devices. There is no standard OpenGL API for this, since I can't even name a device that can do this.</p>
<p>What you SHOULD LOOK INTO is color transforms. Basically, color is relative. For instance, the black on your computer screen is not PHYSICAL darkness, it is just darker than the other colors. OpenGL will accept RGB values in the range of 0.0 to 1.0 (or 0 to 255), and the hardware determines how they will appear to humans. What a color transform can do is modify the RGB values you feed into OpenGL before it reaches the screen, so it has the appearance of a different color space. For instance, Blender and Unreal Engine both have filmic color transforms that can allow for extremely bright whites (RGB &gt;&gt; 1.0 or 255) without washing out (using a sort of logarithmic scaling). The simplest way to implement a color transform would be in your fragment shader. I do not think OpenGL has in-built color transform pipelines.</p>
<p>Blender's filmic color transform as well as other color management code uses OpenColorIO: If you are interested, you can google further:
<a href="https://docs.blender.org/manual/en/latest/render/color_management.html" rel="nofollow noreferrer">https://docs.blender.org/manual/en/latest/render/color_management.html</a></p>
<p><strong>NOTE</strong>
Most monitors support sRGB, which is a standard describing a mapping between the 0.0-1.0 range RGB values to physical colors (i.e. red/green/blue sub-pixel physical brightnesses). However, many monitors boast expanded physical color-spaces, with their own transforms. If you are extremely concerned with color fidelity, you may want to look into the color mappings for the monitors you wish to support.</p>

CC BY-SA 4.0
2021-08-18T07:30:39.307Z
2021-08-18T07:30:39.307Z
Michael Sohnen
<p>sRGB does have luminance (perceived brightness), and the limitations you express concern about are a display hardware limitation, <em>not</em> a limitation of the underlying algorithms we use. PBR algorithms are <em>not</em> limited in there ability to compute brightness and color, but display hardware does have limitations, and after computing a value with both luminance and color, it can then be converted to a format that the display hardware is capable of displaying. And there <em>is</em> hardware that has extended brightness, which allows graphics programs to show a wider range of color, and brightness.</p>
<p>Many new graphics programmers make the mistake of thinking a <em>color space</em> only describes <em>color</em>. This is naïve as a color space encodes both color and luminance (the perceived brightness of a light) the sRGB color space was designed many years ago to fit the hardware of the time and its luminance range reflects that. The international standard color space CIE XYZ encodes luminance directly in the Y value, and all standardized color spaces including sRGB have conversion functions that allow them to be converted to and from the CIE XYZ color space. If you want to compute the luminance of any given sRGB value then convert it to CIE XYZ and look at the Y value, you will find that there are many different luminance values that the various sRGB values convert to.</p>

CC BY-SA 4.0
2021-08-18T12:47:43.273Z
Thanks for the information, didn't know the color space is that complex...
neo-mashiro
CC BY-SA 4.0
2021-08-18T12:31:14.070Z
2021-08-18T12:31:14.070Z
pmw1234
<p>So, I've been learning 3D rendering for more than a year now, and I've read a lot about various rendering techniques and theories, such as PBR, deferred shading, real-time raytracing, BRDF, all that stuff. As far as I know, these topics are either trying to solve the rendering equation, or reduce the computation overhead to boost performance, it's almost always on the side of software, and it seems that shading only cares about finding the color for each pixel. Whatever smart algorithms we use, the most bright pixel on the screen can only be white, we can't have a pixel brighter than <code>RGB(255,255,255)</code>, which is not realistic.</p>
<p>In the real world, human eyes can see much more than just RGBA colors, so I wonder if we can change the pixel brightness in a shader program. To clarify, I'm talking about the screen brightness, brightness of the monitor that we can adjust in hardware settings. For example, each pixel could not only have a color, but also a different brightness value depending on the shader code, is this possible? Just like how we have the depth Z-buffer, I wonder if there's any hardware that supports a B-buffer (brightness buffer).</p>

CC BY-SA 4.0
2022-04-11T10:17:58.717Z
Look up HDR rendering to *simulate* this. There also exist monitors that can input and display HDR video signals, where your brightness goes from 0-4095 for example. Of course, it does not mean 4095 is 16 times as bright, rather it means that there are 16 times as many brightness steps... so the user can turn the brightness up 16 times without losing quality in the dark parts.
Criticize SE actions means ban
<shading><brightness>
Is it possible to change pixel brightness programmatically?
neo-mashiro
# Is it possible to change pixel brightness programmatically?

(Asked by: username_0 on 2021-08-18)

So, I've been learning 3D rendering for more than a year now, and I've read a lot about various rendering techniques and theories, such as PBR, deferred shading, real-time raytracing, BRDF, all that stuff. As far as I know, these topics are either trying to solve the rendering equation, or reduce the computation overhead to boost performance, it's almost always on the side of software, and it seems that shading only cares about finding the color for each pixel. Whatever smart algorithms we use, the most bright pixel on the screen can only be white, we can't have a pixel brighter than `RGB(255,255,255)`, which is not realistic.

In the real world, human eyes can see much more than just RGBA colors, so I wonder if we can change the pixel brightness in a shader program. To clarify, I'm talking about the screen brightness, brightness of the monitor that we can adjust in hardware settings. For example, each pixel could not only have a color, but also a different brightness value depending on the shader code, is this possible? Just like how we have the depth Z-buffer, I wonder if there's any hardware that supports a B-buffer (brightness buffer).

**Tags:** shading, brightness

> **Comments:**
> **username_1**: Look up HDR rendering to *simulate* this. There also exist monitors that can input and display HDR video signals, where your brightness goes from 0-4095 for example. Of course, it does not mean 4095 is 16 times as bright, rather it means that there are 16 times as many brightness steps... so the user can turn the brightness up 16 times without losing quality in the dark parts.  

---

## 2 answers

### Answer by username_2 on 2021-08-18. Score: 1 | Accepted answer

I doubt that per-pixel PHYSICAL brightness control is possible. Many computers still use LCD, which uses a single backlight which is spread by optical planes, so there is no per-pixel brightness. Even on LED computers it would be a nightmare to implement variable brightness in hardware.

One important thing to remember is that when you increase pixel brightness, the blacks will also get brighter. Therefore, gains in contrast due to per-pixel PHYSICAL brightness control may not be predictable.

If you somehow find any hardware that provides a win32 or similar API for per-pixel PHYSICAL brightness, I doubt it will port to any commonly used devices. There is no standard OpenGL API for this, since I can't even name a device that can do this.

What you SHOULD LOOK INTO is color transforms. Basically, color is relative. For instance, the black on your computer screen is not PHYSICAL darkness, it is just darker than the other colors. OpenGL will accept RGB values in the range of 0.0 to 1.0 (or 0 to 255), and the hardware determines how they will appear to humans. What a color transform can do is modify the RGB values you feed into OpenGL before it reaches the screen, so it has the appearance of a different color space. For instance, Blender and Unreal Engine both have filmic color transforms that can allow for extremely bright whites (RGB >> 1.0 or 255) without washing out (using a sort of logarithmic scaling). The simplest way to implement a color transform would be in your fragment shader. I do not think OpenGL has in-built color transform pipelines.

Blender's filmic color transform as well as other color management code uses OpenColorIO: If you are interested, you can google further:
<https://docs.blender.org/manual/en/latest/render/color_management.html>

**NOTE**
Most monitors support sRGB, which is a standard describing a mapping between the 0.0-1.0 range RGB values to physical colors (i.e. red/green/blue sub-pixel physical brightnesses). However, many monitors boast expanded physical color-spaces, with their own transforms. If you are extremely concerned with color fidelity, you may want to look into the color mappings for the monitors you wish to support.


---

### Answer by username_3 on 2021-08-18. Score: 1

sRGB does have luminance (perceived brightness), and the limitations you express concern about are a display hardware limitation, *not* a limitation of the underlying algorithms we use. PBR algorithms are *not* limited in there ability to compute brightness and color, but display hardware does have limitations, and after computing a value with both luminance and color, it can then be converted to a format that the display hardware is capable of displaying. And there *is* hardware that has extended brightness, which allows graphics programs to show a wider range of color, and brightness.

Many new graphics programmers make the mistake of thinking a *color space* only describes *color*. This is naïve as a color space encodes both color and luminance (the perceived brightness of a light) the sRGB color space was designed many years ago to fit the hardware of the time and its luminance range reflects that. The international standard color space CIE XYZ encodes luminance directly in the Y value, and all standardized color spaces including sRGB have conversion functions that allow them to be converted to and from the CIE XYZ color space. If you want to compute the luminance of any given sRGB value then convert it to CIE XYZ and look at the Y value, you will find that there are many different luminance values that the various sRGB values convert to.

> **Comments:**
> **username_0**: Thanks for the information, didn't know the color space is that complex...  

---

