diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-04-27 21:50:11 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-04-27 21:50:11 +0400 |
commit | 69b0b0a6240635bf6264835a2da928aa48dcb5be (patch) | |
tree | a99236e879c58af4c055e0f4b581fa6cdc954b71 /intern/opencolorio/ocio_impl_glsl.cc | |
parent | 1fe4a273053abaa22a7d4b8af2475f1a05728b47 (diff) |
Fix for fix in alpha de-premul
We do not need to premul shader result, opengl
is already configured for straight alpha.
Diffstat (limited to 'intern/opencolorio/ocio_impl_glsl.cc')
-rw-r--r-- | intern/opencolorio/ocio_impl_glsl.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/opencolorio/ocio_impl_glsl.cc b/intern/opencolorio/ocio_impl_glsl.cc index 0f8ab5b9905..0c96a000b9e 100644 --- a/intern/opencolorio/ocio_impl_glsl.cc +++ b/intern/opencolorio/ocio_impl_glsl.cc @@ -79,6 +79,10 @@ typedef struct OCIO_GLSLDrawState { } OCIO_GLSLDrawState; /* Hardcoded to do alpha predivide before color space conversion */ +/* NOTE: This is true we only do de-premul here and NO premul + * and the reason is simple -- opengl is always configured + * for straight alpha at this moment + */ static const char *g_fragShaderText = "" "\n" "uniform sampler2D tex1;\n" @@ -99,10 +103,6 @@ static const char *g_fragShaderText = "" " col[2] *= inv_alpha;\n" "\n" " gl_FragColor = OCIODisplay(col, tex2);\n" -"\n" -" gl_FragColor[0] *= alpha;\n" -" gl_FragColor[1] *= alpha;\n" -" gl_FragColor[2] *= alpha;\n" " }\n" "\n" "}\n"; |