blob: 3b23ac976aecc8c064a5376e65ad5d13f03ce6ac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
void node_hair_info(out float is_strand,
out float intercept,
out float thickness,
out vec3 tangent,
out float random)
{
#ifdef HAIR_SHADER
is_strand = 1.0;
intercept = hairTime;
thickness = hairThickness;
tangent = normalize(worldNormal);
random = wang_hash_noise(
uint(hairStrandID)); /* TODO: could be precomputed per strand instead. */
#else
is_strand = 0.0;
intercept = 0.0;
thickness = 0.0;
tangent = vec3(1.0);
random = 0.0;
#endif
}
|