]> git.tdb.fi Git - libs/gl.git/blobdiff - shaderlib/colorcurve.glsl
Check the flat qualifier from the correct member
[libs/gl.git] / shaderlib / colorcurve.glsl
diff --git a/shaderlib/colorcurve.glsl b/shaderlib/colorcurve.glsl
deleted file mode 100644 (file)
index 63f6313..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-import postprocess;
-
-uniform sampler1D curve;
-uniform ToneMapping
-{
-       float exposure;
-       vec3 brightness_response;
-};
-
-////// fragment
-void main()
-{
-       vec4 incoming = texture(source, texcoord);
-       float maxc = max(incoming.r, max(incoming.g, incoming.b));
-       if(maxc>0.0)
-       {
-               vec3 saturated = incoming.rgb/maxc;
-               maxc = pow(maxc*exposure+brightness_response.y, brightness_response.x)-brightness_response.z;
-               float c = min(maxc, 1.0);
-               float minc = min(saturated.r, min(saturated.g, saturated.b));
-               incoming.rgb = mix(saturated, vec3(1.0), min((maxc-c)/(1.0-minc), 1.0))*c;
-       }
-       frag_color = vec4(texture(curve, incoming.r).r, texture(curve, incoming.g).r, texture(curve, incoming.b).r, incoming.a);
-}