[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56345] trunk/blender/intern/opencolorio/ ocio_impl_glsl.cc: Fix for fix in alpha de-premul
Sergey Sharybin
sergey.vfx at gmail.com
Sat Apr 27 19:50:11 CEST 2013
Revision: 56345
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56345
Author: nazgul
Date: 2013-04-27 17:50:11 +0000 (Sat, 27 Apr 2013)
Log Message:
-----------
Fix for fix in alpha de-premul
We do not need to premul shader result, opengl
is already configured for straight alpha.
Modified Paths:
--------------
trunk/blender/intern/opencolorio/ocio_impl_glsl.cc
Modified: trunk/blender/intern/opencolorio/ocio_impl_glsl.cc
===================================================================
--- trunk/blender/intern/opencolorio/ocio_impl_glsl.cc 2013-04-27 17:41:10 UTC (rev 56344)
+++ trunk/blender/intern/opencolorio/ocio_impl_glsl.cc 2013-04-27 17:50:11 UTC (rev 56345)
@@ -79,6 +79,10 @@
} 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 @@
" 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";
More information about the Bf-blender-cvs
mailing list