<p>This is a hard problem since the systems do not in fact tell you how it should operate. The problem is that there are several ways to address this issue:</p>

<ol>
<li>Apply a LUT to all output</li>
<li>Let the system color manage</li>
<li>Let each application color manage</li>
</ol>

<p>Nearly all of our color management systems are borderline braindead. There is really no sane way to ensure that you are doing the proper thing without extensively testing the system. You can not ask or specify your intent. In case of multi operating system situations. If there is reason for me to color manage something myself im at the mercy of each operating system peculiarities.</p>

<p>For a alternate discussion on this see this <a href="https://stackoverflow.com/questions/23026151/do-i-need-to-gamma-correct-the-final-color-output-on-a-modern-computer-monitor">stackoverflow post</a>. But its not really a robust enough talk to cover all cases.</p>

CC BY-SA 3.0
2016-03-28T10:43:15.020Z
Thanks for the reference !  In case of web application, this adds one more level of difficulties. The fact is that as shadertoy shows, not all people see the same result. Plus in all API already providing a texture loading, I guess we can just hope a linearization is done.
Fabrice NEYRET
CC BY-SA 3.0
2016-03-28T10:44:21.600Z
Beside, when preparing a slide on googleDoc comprising imported images, exporting in pdf, and displaying via acroread on the same screen, I already don't have the same gamma for the 2 copies of the image !
Fabrice NEYRET
CC BY-SA 3.0
2016-03-28T08:47:03.953Z
2016-03-28T08:47:03.953Z
2017-05-23T12:39:19.850Z
joojaa
<p>Color spaces issues are such a pain, especially when you create color data at the middle of the chain, and a pile of libs and apps separate this to the display... Here I only worry about gamma transform.</p>

<p><a href="http://shadertoy.com">Shadertoy</a> addicts are coding in this web site webGLSL shaders, which in my case are rendered through google chrome on linux ubuntu and displayed on a calibrated monitor. </p>

<p>Is one layer already doing the gamma transform, or should I do pow(color,1./2.2) at the end of my rendering ?
For me (linux,etc), it seems I must do it. Is it also true on windows, mac OS, whether Angle or Native OpenGL is used (windows), whatever the browser ?
The point is that often shaders look ok on windows and very dark on linux, for instance, both people being sure of their settings and qualibration.</p>

CC BY-SA 3.0
2016-03-17T03:48:40.693Z
Great question, I'm also curious.
Alan Wolfe
CC BY-SA 3.0
2016-03-17T08:23:56.873Z
I suggest you do a test by outputting a grey scale band, and see how it looks on all your available platforms. then try the same thing with `pow(c, 1/2.2)` at the end of the pipeline. Your trained eye will immediately see which is good and which is over-done. Over-done gamma should result in banding.
v.oddou
CC BY-SA 3.0
2016-03-17T08:28:42.067Z
I came here *because* of the test I've done :-) https://www.shadertoy.com/view/4stSRN
The real world of webGLSL is incredibly messy and unrobust: behaviors can depend on driver, browser, OS, settings (Angle vs native OpenGL, display settings - soft and hard), plus the versions of all these. ( Of course here I had to trust people telling there system is well calibrated. )
Fabrice NEYRET
CC BY-SA 3.0
2016-03-17T20:23:01.877Z
You cold add that to your post ;) Unfortunately this is all just a case of futility.
joojaa
<glsl><webgl><gamma>
gamma transform in webGLSL: when already done or yet to be done?
Fabrice NEYRET
# gamma transform in webGLSL: when already done or yet to be done?

(Asked by: username_0 on 2016-03-15)

Color spaces issues are such a pain, especially when you create color data at the middle of the chain, and a pile of libs and apps separate this to the display... Here I only worry about gamma transform.

[Shadertoy](http://shadertoy.com) addicts are coding in this web site webGLSL shaders, which in my case are rendered through google chrome on linux ubuntu and displayed on a calibrated monitor.

Is one layer already doing the gamma transform, or should I do pow(color,1./2.2) at the end of my rendering ?
For me (linux,etc), it seems I must do it. Is it also true on windows, mac OS, whether Angle or Native OpenGL is used (windows), whatever the browser ?
The point is that often shaders look ok on windows and very dark on linux, for instance, both people being sure of their settings and qualibration.

**Tags:** glsl, webgl, gamma

> **Comments:**
> **username_1**: Great question, I'm also curious.  
> **username_2**: I suggest you do a test by outputting a grey scale band, and see how it looks on all your available platforms. then try the same thing with `pow(c, 1/2.2)` at the end of the pipeline. Your trained eye will immediately see which is good and which is over-done. Over-done gamma should result in banding.  
> **username_0**: I came here *because* of the test I've done :-) https://www.shadertoy.com/view/4stSRN The real world of webGLSL is incredibly messy and unrobust: behaviors can depend on driver, browser, OS, settings (Angle vs native OpenGL, display settings - soft and hard), plus the versions of all these. ( Of course here I had to trust people telling there system is well calibrated. )  
> **username_3**: You cold add that to your post ;) Unfortunately this is all just a case of futility.  

---

## 1 answers

### Answer by username_3 on 2016-03-28. Score: 1

This is a hard problem since the systems do not in fact tell you how it should operate. The problem is that there are several ways to address this issue:

1. Apply a LUT to all output
2. Let the system color manage
3. Let each application color manage

Nearly all of our color management systems are borderline braindead. There is really no sane way to ensure that you are doing the proper thing without extensively testing the system. You can not ask or specify your intent. In case of multi operating system situations. If there is reason for me to color manage something myself im at the mercy of each operating system peculiarities.

For a alternate discussion on this see this [stackoverflow post](https://stackoverflow.com/questions/23026151/do-i-need-to-gamma-correct-the-final-color-output-on-a-modern-computer-monitor). But its not really a robust enough talk to cover all cases.

> **Comments:**
> **username_0**: Thanks for the reference !  In case of web application, this adds one more level of difficulties. The fact is that as shadertoy shows, not all people see the same result. Plus in all API already providing a texture loading, I guess we can just hope a linearization is done.  
> **username_0**: Beside, when preparing a slide on googleDoc comprising imported images, exporting in pdf, and displaying via acroread on the same screen, I already don't have the same gamma for the 2 copies of the image !  

---

