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

gpu_shader_material_refraction.glsl « material « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 871fa00b3d46f79fed1b2421f413d62c9368d3c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

void node_bsdf_refraction(
    vec4 color, float roughness, float ior, vec3 N, float weight, out Closure result)
{
  N = safe_normalize(N);

  ClosureRefraction refraction_data;
  refraction_data.weight = weight;
  refraction_data.color = color.rgb;
  refraction_data.N = N;
  refraction_data.roughness = roughness;
  refraction_data.ior = ior;

  result = closure_eval(refraction_data);
}