[Bf-blender-cvs] [868d360] master: Fix T45693: Fix for using 4-component vector as 3 component in osd shader
Sergey Sharybin
noreply at git.blender.org
Wed Aug 5 21:36:29 CEST 2015
Commit: 868d3605ee336895dffb2e80bc92d56a1c035719
Author: Sergey Sharybin
Date: Wed Aug 5 21:35:38 2015 +0200
Branches: master
https://developer.blender.org/rB868d3605ee336895dffb2e80bc92d56a1c035719
Fix T45693: Fix for using 4-component vector as 3 component in osd shader
===================================================================
M intern/opensubdiv/gpu_shader_opensubd_display.glsl
===================================================================
diff --git a/intern/opensubdiv/gpu_shader_opensubd_display.glsl b/intern/opensubdiv/gpu_shader_opensubd_display.glsl
index 7acde19..7fddcf2 100644
--- a/intern/opensubdiv/gpu_shader_opensubd_display.glsl
+++ b/intern/opensubdiv/gpu_shader_opensubd_display.glsl
@@ -249,8 +249,8 @@ void main()
vec3 h = normalize(l + vec3(0, 0, 1));
float d = max(0.0, dot(N, l));
float s = pow(max(0.0, dot(N, h)), shininess);
- L_diffuse += d * lightSource[i].diffuse;
- L_specular += s * lightSource[i].specular;
+ L_diffuse += d * lightSource[i].diffuse.rgb;
+ L_specular += s * lightSource[i].specular.rgb;
}
#else /* USE_COLOR_MATERIAL */
vec3 varying_position = inpt.v.position.xyz;
More information about the Bf-blender-cvs
mailing list