]> git.tdb.fi Git - libs/gl.git/commitdiff
Fix type errors in ColorCurve fragment shader
authorMikko Rasa <tdb@tdb.fi>
Thu, 13 Sep 2012 08:36:07 +0000 (11:36 +0300)
committerMikko Rasa <tdb@tdb.fi>
Thu, 13 Sep 2012 08:36:07 +0000 (11:36 +0300)
source/colorcurve.cpp

index d008593e047a0c2f9fed620471dcdea1057d794c..ae09b7e62a9b93da283a3918727e32c2cd9642d2 100644 (file)
@@ -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"