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-05-02 19:39:17 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-05-02 19:39:53 +0300
commit1ff2646d5858676761dac88e24b7d2da4ba4ba7d (patch)
treed0e292fe579530399b8e53a8689b157700c07dfc /source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl
parent965e6ed54f058c21ae6096a5449fb3d1e5235821 (diff)
Eevee: Add Lamp Specular multiplier.
It's usefull in some scenario to tweak the specular intensity of a light without modifying the diffuse contribution. Cycles allows it via lamps material which we currently not support in Eevee. This is a good workaround for now.
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl')
-rw-r--r--source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl b/source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl
index cc66b477da0..88fde8929cb 100644
--- a/source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl
+++ b/source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl
@@ -200,11 +200,11 @@ void CLOSURE_NAME(
#endif
#ifdef CLOSURE_GLOSSY
- out_spec += l_color_vis * light_specular(ld, N, view_vec, l_vector, roughnessSquared, f0) * occlu;
+ out_spec += l_color_vis * light_specular(ld, N, view_vec, l_vector, roughnessSquared, f0) * occlu * ld.l_spec;
#endif
#ifdef CLOSURE_CLEARCOAT
- out_spec += l_color_vis * light_specular(ld, C_N, view_vec, l_vector, C_roughnessSquared, f0) * C_intensity * occlu;
+ out_spec += l_color_vis * light_specular(ld, C_N, view_vec, l_vector, C_roughnessSquared, f0) * C_intensity * occlu * ld.l_spec;
#endif
#else /* HAIR_SHADER */
@@ -218,11 +218,11 @@ void CLOSURE_NAME(
#endif
#ifdef CLOSURE_GLOSSY
- out_spec += l_color_vis * light_specular(ld, N, V, l_vector, roughnessSquared, f0);
+ out_spec += l_color_vis * light_specular(ld, N, V, l_vector, roughnessSquared, f0) * ld.l_spec;
#endif
#ifdef CLOSURE_CLEARCOAT
- out_spec += l_color_vis * light_specular(ld, C_N, V, l_vector, C_roughnessSquared, f0) * C_intensity;
+ out_spec += l_color_vis * light_specular(ld, C_N, V, l_vector, C_roughnessSquared, f0) * C_intensity * ld.l_spec;
#endif
#endif /* HAIR_SHADER */