EEVEE: Fix undefined behavior in world output

This commit is contained in:
Clément Foucault 2020-07-15 15:01:59 +02:00
parent 24c846b2b4
commit 2c1edcf3ef
1 changed files with 1 additions and 0 deletions

View File

@ -4,6 +4,7 @@ void node_output_world(Closure surface, Closure volume, out Closure result)
{
#ifndef VOLUMETRICS
float alpha = renderPassEnvironment ? 1.0 : backgroundAlpha;
result = CLOSURE_DEFAULT;
result.radiance = surface.radiance * alpha;
result.transmittance = vec3(1.0 - alpha);
#else