[Bf-blender-cvs] [6a6cb83eb30] master: Fix T79568 EEVEE: Film transparent not working

Clément Foucault noreply at git.blender.org
Tue Aug 18 12:26:25 CEST 2020


Commit: 6a6cb83eb306d2b774ad2f029dc7beadc43bf28b
Author: Clément Foucault
Date:   Tue Aug 18 12:26:10 2020 +0200
Branches: master
https://developer.blender.org/rB6a6cb83eb306d2b774ad2f029dc7beadc43bf28b

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.

===================================================================

M	source/blender/gpu/shaders/material/gpu_shader_material_output_world.glsl

===================================================================

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 */



More information about the Bf-blender-cvs mailing list