From a8463284bb7f249c9f61b503d0d551bd94e1931f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Mon, 23 Apr 2018 21:00:32 +0200 Subject: GPUShader: Fix simple lighting modulating alpha color --- source/blender/gpu/shaders/gpu_shader_simple_lighting_frag.glsl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } -- cgit v1.2.3