Revision: 56967
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56967
Author:   blendix
Date:     2013-05-22 20:18:17 +0000 (Wed, 22 May 2013)
Log Message:
-----------
Fix #35459: global texture coordinates not working with GLSL shaders. Got broken
in shader uniform binding optimizations in revision 55527.

Revision Links:
--------------
    
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55527

Modified Paths:
--------------
    trunk/blender/source/blender/gpu/intern/gpu_material.c

Modified: trunk/blender/source/blender/gpu/intern/gpu_material.c
===================================================================
--- trunk/blender/source/blender/gpu/intern/gpu_material.c      2013-05-22 
20:06:50 UTC (rev 56966)
+++ trunk/blender/source/blender/gpu/intern/gpu_material.c      2013-05-22 
20:18:17 UTC (rev 56967)
@@ -300,6 +300,9 @@
                        }
                }
 
+               /* note material must be bound before setting uniforms */
+               GPU_pass_bind(material->pass, time, mipmap);
+
                /* handle per material built-ins */
                if (material->builtins & GPU_VIEW_MATRIX) {
                        GPU_shader_uniform_vector(shader, material->viewmatloc, 
16, 1, (float*)viewmat);
@@ -308,7 +311,6 @@
                        GPU_shader_uniform_vector(shader, 
material->invviewmatloc, 16, 1, (float*)viewinv);
                }
 
-               GPU_pass_bind(material->pass, time, mipmap);
                GPU_pass_update_uniforms(material->pass);
 
                material->bound = 1;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to