gamma correction fallback for -nosrgb
[demo_prior] / sdr / gamma.p.glsl
diff --git a/sdr/gamma.p.glsl b/sdr/gamma.p.glsl
new file mode 100644 (file)
index 0000000..a37f189
--- /dev/null
@@ -0,0 +1,8 @@
+uniform sampler2D tex;
+
+void main()
+{
+       vec3 texel = texture2D(tex, gl_TexCoord[0].st).rgb;
+       vec3 col = pow(texel, vec3(1.0 / 2.2));
+       gl_FragColor = vec4(col, 1.0);
+}