diff options
author | Jeroen Bakker <jbakker> | 2020-07-02 12:19:12 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-07-02 12:27:23 +0300 |
commit | ba2c039b05a84de1dccbeef71b8b2ac89a072869 (patch) | |
tree | ea652b6ebdc9d04d757042fed984bac9b7085bdc /source/blender/gpu/shaders/material | |
parent | 945d0269e32efa1e5fd4091ae0f6366031f5ed04 (diff) |
Fix T77686: EEVEE environment pass with film transparency
When the film is set to transparent the environment pass should still be
rendered solid. otherwise it renders black.
Reviewed By: Clément Foucault
Differential Revision: https://developer.blender.org/D8046
Diffstat (limited to 'source/blender/gpu/shaders/material')
-rw-r--r-- | source/blender/gpu/shaders/material/gpu_shader_material_output_world.glsl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/gpu/shaders/material/gpu_shader_material_output_world.glsl b/source/blender/gpu/shaders/material/gpu_shader_material_output_world.glsl index ba391df185e..b298fa4f8d1 100644 --- a/source/blender/gpu/shaders/material/gpu_shader_material_output_world.glsl +++ b/source/blender/gpu/shaders/material/gpu_shader_material_output_world.glsl @@ -3,8 +3,9 @@ uniform float backgroundAlpha; void node_output_world(Closure surface, Closure volume, out Closure result) { #ifndef VOLUMETRICS - result.radiance = surface.radiance * backgroundAlpha; - result.transmittance = vec3(1.0 - backgroundAlpha); + float alpha = renderPassEnvironment ? 1.0 : backgroundAlpha; + result.radiance = surface.radiance * alpha; + result.transmittance = vec3(1.0 - alpha); #else result = volume; #endif /* VOLUMETRICS */ |