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.
This commit is contained in:
Clément Foucault 2020-08-18 12:26:10 +02:00
parent ca7414c4cb
commit 6a6cb83eb3
Notes: blender-bot 2023-02-14 09:48:23 +01:00
Referenced by issue #79568, EEVEE Film transparent not working
1 changed files with 2 additions and 1 deletions

View File

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