[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56342] trunk/blender/intern/opencolorio/ ocio_impl_glsl.cc: Apparently better not to use values like 1. 0f in GLSL code

Sergey Sharybin sergey.vfx at gmail.com
Sat Apr 27 18:43:15 CEST 2013


Revision: 56342
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56342
Author:   nazgul
Date:     2013-04-27 16:43:15 +0000 (Sat, 27 Apr 2013)
Log Message:
-----------
Apparently better not to use values like 1.0f in GLSL code

Fix from debug session of self and Ton, was affecting OSX
builds, making GLSL display transform not working on this
platform.

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 16:34:56 UTC (rev 56341)
+++ trunk/blender/intern/opencolorio/ocio_impl_glsl.cc	2013-04-27 16:43:15 UTC (rev 56342)
@@ -88,11 +88,11 @@
 "void main()\n"
 "{\n"
 "    vec4 col = texture2D(tex1, gl_TexCoord[0].st);\n"
-"    if (predivide == false || col[3] == 1.0f || col[3] == 0.0f) {\n"
+"    if (predivide == false || col[3] == 1.0 || col[3] == 0.0) {\n"
 "      gl_FragColor = OCIODisplay(col, tex2);\n"
 "    } else {\n"
 "      float alpha = col[3];\n"
-"      float inv_alpha = 1.0f / alpha;\n"
+"      float inv_alpha = 1.0 / alpha;\n"
 "\n"
 "      col[0] *= inv_alpha;\n"
 "      col[1] *= inv_alpha;\n"




More information about the Bf-blender-cvs mailing list