From a6d815f80e7abad98dc9ee47198827d45dc9d251 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 13 Sep 2012 11:36:07 +0300 Subject: [PATCH] Fix type errors in ColorCurve fragment shader --- source/colorcurve.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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" -- 2.45.2