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

gpu_shader_material_attribute.glsl « material « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2ae53b35b3fca095aae30f75cd9db470e8845d86 (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_attribute_color(vec4 attr, out vec4 out_attr)
{
  out_attr = attr_load_color_post(attr);
}

void node_attribute_temperature(vec4 attr, out vec4 out_attr)
{
  out_attr.x = attr_load_temperature_post(attr.x);
  out_attr.y = 0.0;
  out_attr.z = 0.0;
  out_attr.w = 1.0;
}

void node_attribute(
    vec4 attr, out vec4 outcol, out vec3 outvec, out float outf, out float outalpha)
{
  outcol = vec4(attr.xyz, 1.0);
  outvec = attr.xyz;
  outf = avg(attr.xyz);
  outalpha = attr.w;
}