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

gpu_shader_material_subsurface_scattering.glsl « material « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c560dd01c4ff2eb4fa38857270b70166252c8eb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

void node_subsurface_scattering(vec4 color,
                                float scale,
                                vec3 radius,
                                float ior,
                                float anisotropy,
                                vec3 N,
                                float weight,
                                float do_sss,
                                out Closure result)
{
  N = safe_normalize(N);

  ClosureDiffuse diffuse_data;
  diffuse_data.weight = weight;
  diffuse_data.color = color.rgb;
  diffuse_data.N = N;
  diffuse_data.sss_radius = radius * scale;
  diffuse_data.sss_id = uint(do_sss);

  result = closure_eval(diffuse_data);
}