Premultiplication in OCIO shader went wrong,
authorSergey Sharybin <sergey.vfx@gmail.com>
Sat, 27 Apr 2013 17:08:37 +0000 (17:08 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sat, 27 Apr 2013 17:08:37 +0000 (17:08 +0000)
it used to apply alpha on source color after
conversion, not on result.

intern/opencolorio/ocio_impl_glsl.cc

index 13c2fc07a9a1655d318839835743d19bbbbf48e4..0f8ab5b990540d554a50844c4a094576d0de0c9b 100644 (file)
@@ -100,9 +100,9 @@ static const char *g_fragShaderText = ""
 "\n"
 "      gl_FragColor = OCIODisplay(col, tex2);\n"
 "\n"
-"      col[0] *= alpha;\n"
-"      col[1] *= alpha;\n"
-"      col[2] *= alpha;\n"
+"      gl_FragColor[0] *= alpha;\n"
+"      gl_FragColor[1] *= alpha;\n"
+"      gl_FragColor[2] *= alpha;\n"
 "    }\n"
 "\n"
 "}\n";