Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gpu_shader_material_output_world.glsl « material « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 27ca96501ae3e6457dce058f26eaa8a211345ae8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
uniform float backgroundAlpha;

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
  result = volume;
#endif /* VOLUMETRICS */
}