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-07-13 17:25:51 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-07-13 17:25:51 +0300
commit930c22e84a6d91843e56274842ea85c789fc5125 (patch)
tree4ea440cf1b3aca85fb26cf889f9eaff854a136da /source/blender/gpu/shaders/material
parent98f9a6667bd1b5e45fef752e0140d9e35847fd69 (diff)
Fix undefined behavior with background alpha
Diffstat (limited to 'source/blender/gpu/shaders/material')
-rw-r--r--source/blender/gpu/shaders/material/gpu_shader_material_output_world.glsl1
1 files changed, 1 insertions, 0 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 b298fa4f8d1..27ca96501ae 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
@@ -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