diff options
Diffstat (limited to 'source/blender/gpu/shaders/material/gpu_shader_material_background.glsl')
-rw-r--r-- | source/blender/gpu/shaders/material/gpu_shader_material_background.glsl | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/source/blender/gpu/shaders/material/gpu_shader_material_background.glsl b/source/blender/gpu/shaders/material/gpu_shader_material_background.glsl index 69ef4dcb7c7..2460bd63b38 100644 --- a/source/blender/gpu/shaders/material/gpu_shader_material_background.glsl +++ b/source/blender/gpu/shaders/material/gpu_shader_material_background.glsl @@ -1,11 +1,9 @@ -void node_background(vec4 color, float strength, out Closure result) + +void node_background(vec4 color, float strength, float weight, out Closure result) { -#ifndef VOLUMETRICS - color *= strength; - result = CLOSURE_DEFAULT; - result.radiance = color.rgb; - result.transmittance = vec3(0.0); -#else - result = CLOSURE_DEFAULT; -#endif + ClosureEmission emission_data; + emission_data.weight = weight; + emission_data.emission = color.rgb * strength; + + result = closure_eval(emission_data); } |