blob: 5e86a4577eef6c6aa69c5bfd56592edf3a482896 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#pragma BLENDER_REQUIRE(gpu_shader_material_tangent.glsl)
void node_geometry(vec3 orco,
out vec3 position,
out vec3 normal,
out vec3 tangent,
out vec3 true_normal,
out vec3 incoming,
out vec3 parametric,
out float backfacing,
out float pointiness,
out float random_per_island)
{
/* handle perspective/orthographic */
incoming = coordinate_incoming(g_data.P);
position = g_data.P;
normal = g_data.N;
true_normal = g_data.Ng;
if (g_data.is_strand) {
tangent = g_data.T;
}
else {
tangent_orco_z(orco, orco);
node_tangent(orco, tangent);
}
parametric = vec3(g_data.barycentric_coords, 0.0);
backfacing = (FrontFacing) ? 0.0 : 1.0;
pointiness = 0.5;
random_per_island = 0.0;
}
|