Fix T45693: Fix for using 4-component vector as 3 component in osd shader

This commit is contained in:
Sergey Sharybin 2015-08-05 21:35:38 +02:00
parent 4140312c36
commit 868d3605ee
Notes: blender-bot 2023-02-14 08:58:01 +01:00
Referenced by issue #45693, Opensubdiv Crash
1 changed files with 2 additions and 2 deletions

View File

@ -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;