From: Mikko Rasa Date: Thu, 13 Sep 2012 08:36:07 +0000 (+0300) Subject: Fix type errors in ColorCurve fragment shader X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=a6d815f80e7abad98dc9ee47198827d45dc9d251 Fix type errors in ColorCurve fragment shader --- diff --git a/source/colorcurve.cpp b/source/colorcurve.cpp index d008593e..ae09b7e6 100644 --- a/source/colorcurve.cpp +++ b/source/colorcurve.cpp @@ -21,12 +21,12 @@ static const char fragment_src[] = " vec3 saturated = sample.rgb/maxc;\n" " if(maxc>1.0+peak)\n" " {\n" - " gl_FragColor.rgb = mix(vec3(1.0), saturated, 1.0/pow(brightness, maxc-1-peak));\n" + " gl_FragColor.rgb = mix(vec3(1.0), saturated, 1.0/pow(brightness, maxc-1.0-peak));\n" " }\n" " else\n" " {\n" " float x = (1.0+peak-maxc)/(2.0*peak);\n" - " gl_FragColor.rgb = saturated.rgb*(1.0-peak+(1-x*x)*peak);\n" + " gl_FragColor.rgb = saturated.rgb*(1.0-peak+(1.0-x*x)*peak);\n" " }\n" " gl_FragColor.a = sample.a;\n" " }\n"