Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-04-23 22:00:32 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-05-02 21:49:38 +0300
commita8463284bb7f249c9f61b503d0d551bd94e1931f (patch)
tree39ae71976dae03bdff528d72d32ffa4528594718
parentad97ba33670e832627c2abd9a1d64794b1733299 (diff)
GPUShader: Fix simple lighting modulating alpha color
-rw-r--r--source/blender/gpu/shaders/gpu_shader_simple_lighting_frag.glsl3
1 files changed, 2 insertions, 1 deletions
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);
}