diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2019-09-04 17:22:47 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2019-09-06 09:35:14 +0300 |
commit | 1b287230a46d98f7cdfe6cbfd6c86e43c7e14968 (patch) | |
tree | 490cfa85d86d1cbd143534dfa515d49c02c0f15c /source/blender/draw/engines/eevee/shaders | |
parent | f8362836a5c8feff3715ca823025caba249208c2 (diff) |
Viewport Shading: StudioLight Intensity
Add option to change the Intensity of the HDRI in the 3d viewport. This works for both EEVEE and Cycles
Reviewed By: brecht, fclem
Differential Revision: https://developer.blender.org/D5674
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/default_world_frag.glsl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/default_world_frag.glsl b/source/blender/draw/engines/eevee/shaders/default_world_frag.glsl index 70466479a29..41e103609f3 100644 --- a/source/blender/draw/engines/eevee/shaders/default_world_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/default_world_frag.glsl @@ -8,6 +8,7 @@ out vec4 FragColor; uniform mat3 StudioLightMatrix; uniform sampler2D image; uniform float studioLightBackground = 1.0; +uniform float studioLightIntensity = 1.0; in vec3 viewPosition; # define M_PI 3.14159265358979323846 @@ -51,6 +52,7 @@ void main() #ifdef LOOKDEV vec3 worldvec = background_transform_to_world(viewPosition); background_color = node_tex_environment_equirectangular(StudioLightMatrix * worldvec, image).rgb; + background_color *= studioLightIntensity; background_color = mix(color, background_color, studioLightBackground); #else background_color = color; |