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>2020-08-18 13:26:10 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-18 13:26:22 +0300
commit6a6cb83eb306d2b774ad2f029dc7beadc43bf28b (patch)
tree6e35d1339aa184c815c3a2f3cc13c1663f90cdbc /source/blender/gpu/shaders/material
parentca7414c4cb4c85a337dbe3effb76b9a5b1ad7d83 (diff)
Fix T79568 EEVEE: Film transparent not working
Since world shader use the same standard output and are considered opaque, we need to set alpha as holdout.
Diffstat (limited to 'source/blender/gpu/shaders/material')
-rw-r--r--source/blender/gpu/shaders/material/gpu_shader_material_output_world.glsl3
1 files changed, 2 insertions, 1 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 27ca96501ae..5eb853a4c1a 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
@@ -6,7 +6,8 @@ void node_output_world(Closure surface, Closure volume, out Closure result)
float alpha = renderPassEnvironment ? 1.0 : backgroundAlpha;
result = CLOSURE_DEFAULT;
result.radiance = surface.radiance * alpha;
- result.transmittance = vec3(1.0 - alpha);
+ result.transmittance = vec3(0.0);
+ result.holdout = (1.0 - alpha);
#else
result = volume;
#endif /* VOLUMETRICS */