[Bf-blender-cvs] [a8463284bb7] blender2.8: GPUShader: Fix simple lighting modulating alpha color
Clément Foucault
noreply at git.blender.org
Wed May 2 20:54:23 CEST 2018
Commit: a8463284bb7f249c9f61b503d0d551bd94e1931f
Author: Clément Foucault
Date: Mon Apr 23 21:00:32 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBa8463284bb7f249c9f61b503d0d551bd94e1931f
GPUShader: Fix simple lighting modulating alpha color
===================================================================
M source/blender/gpu/shaders/gpu_shader_simple_lighting_frag.glsl
===================================================================
diff --git a/source/blender/gpu/shaders/gpu_shader_simple_lighting_frag.glsl b/source/blender/gpu/shaders/gpu_shader_simple_lighting_frag.glsl
index 4d7131c4eb1..d65768eff4d 100644
--- a/source/blender/gpu/shaders/gpu_shader_simple_lighting_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_simple_lighting_frag.glsl
@@ -13,5 +13,6 @@ out vec4 fragColor;
void main()
{
- fragColor = color * max(0.0, dot(normalize(normal), light));
+ fragColor = color;
+ fragColor.xyz *= clamp(dot(normalize(normal), light), 0.0, 1.0);
}
More information about the Bf-blender-cvs
mailing list