[Bf-blender-cvs] [093be0b] compositor-2016: Fix wrong vertex color in BI GLSL mode

Sergey Sharybin noreply at git.blender.org
Wed Jun 8 21:49:35 CEST 2016


Commit: 093be0bc2bda4b7566fdeadfa56f2991ff2f51c0
Author: Sergey Sharybin
Date:   Mon May 23 14:28:47 2016 +0200
Branches: compositor-2016
https://developer.blender.org/rB093be0bc2bda4b7566fdeadfa56f2991ff2f51c0

Fix wrong vertex color in BI GLSL mode

The issue was caused by recent normalization added to the GLSL attributes.

===================================================================

M	source/blender/gpu/shaders/gpu_shader_material.glsl

===================================================================

diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl
index 506c964..4d7f6d5 100644
--- a/source/blender/gpu/shaders/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@ -149,7 +149,7 @@ void color_to_normal(vec3 color, out vec3 normal)
 
 void vcol_attribute(vec4 attvcol, out vec4 vcol)
 {
-	vcol = vec4(attvcol.x/255.0, attvcol.y/255.0, attvcol.z/255.0, 1.0);
+	vcol = vec4(attvcol.x, attvcol.y, attvcol.z, 1.0);
 }
 
 void uv_attribute(vec2 attuv, out vec3 uv)




More information about the Bf-blender-cvs mailing list