diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-04-23 22:00:32 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-05-02 21:49:38 +0300 |
commit | a8463284bb7f249c9f61b503d0d551bd94e1931f (patch) | |
tree | 39ae71976dae03bdff528d72d32ffa4528594718 /source | |
parent | ad97ba33670e832627c2abd9a1d64794b1733299 (diff) |
GPUShader: Fix simple lighting modulating alpha color
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_simple_lighting_frag.glsl | 3 |
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); } |