Hi there.
I’m using DearIMGUI + WebGPU + GLFW on MacOS, but ideally I’d like my software to be cross-platform.
I’m doing some software rendering, and MacOS is badly color correcting it.
How do I tell GLFW to tell MacOS to stop color correcting so badly?
Thanks,
If you’re using WebGPU then GLFW has no interaction with the framebuffer format and colour correction. If you’re using OpenGL then you can control whether an sRGB capable framebuffer is created.
When software rendering you likely need to gamma correct your linear colour, for more information see: Chapter 24. The Importance of Being Linear | NVIDIA Developer and The sRGB Learning Curve | by Tom Forsyth | Medium in particular you need to apply a transform similar to:
vec3 colOut = pow( linearCol, 1.0 / 2.2 );
Thanks! Just determining for sure where the “contact point” with color correction is a challenge.
FYI, it’s not a gamma issue, but a color issue. Literally, colors with no blue end up with “on-screen” blue values of >40. Sigh.