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

gpu_shader_material_output_material.glsl « material « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4cb00c15b78543455bdab6c59fb0a3efd60ae89f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
void node_output_material(
    Closure surface, Closure volume, vec3 displacement, float alpha_threshold, out Closure result)
{
#ifdef VOLUMETRICS
  result = volume;
#else
  result = surface;
#  if defined(USE_ALPHA_HASH)
  /* Alpha clip emulation. */
  if (alpha_threshold >= 0.0) {
    float alpha = saturate(1.0 - avg(result.transmittance));
    result.transmittance = vec3(step(alpha, alpha_threshold));
  }
#  endif
#endif
}