Skip to main content
6 votes

Optimized linear to sRGB GLSL

Adjusted version of Tynach's answer that leaves the alpha channel alone, since it's already linear. ...
Pieter-Jan Briers's user avatar
5 votes

Optimized linear to sRGB GLSL

A few days ago, I ran into this when messing around on Shadertoy. I was curious and some solutions to the various problems I faced, so I may as well post what I've made here for you. Note, however, ...
Tynach's user avatar
  • 151
5 votes

Creating colour spectrum by light flux values

Here is a little help on getting you started with this rendering. This may not be the best way to accomplish this task however, it should work. First I created a structure to hold your data for ...
jgallant's user avatar
  • 8,424
3 votes

What does the alpha channel on a back buffer do?

You can use the destination's alpha (backbuffer) as a factor in blending functions such as GL_DST_ALPHA and ...
Stephane Hockenhull's user avatar
1 vote

What is a correct approach to gamma correction in OpenGL?

Ask OpenGL driver if it has extensions for framebuffer and texture sRGB conversions. And implement fallback gamma correction with #ifdef in shader code. You must ...
jusski's user avatar
  • 21
1 vote

How to create a texture SRV with different sRGB format from a render target in DX11?

Direct3D supports 'type re-casting' within limits. You typically have to first create the resource as 'typeless' which in this case would be ...
Chuck Walbourn's user avatar
1 vote

Why is enabling GL_FRAMEBUFFER_SRGB making the colours brighter?

My shaders work in the linear space, and I rely on glEnable( GL_FRAMEBUFFER_SRGB ) to do the conversion. To drive the monitor (which has a very low response for ...
Bram's user avatar
  • 3,729

Only top scored, non community-wiki answers of a minimum length are eligible