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

gpu_shader_material_hair_info.glsl « material « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a8b4b039370230e1d9b315df722f598146fbcfd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#pragma BLENDER_REQUIRE(gpu_shader_material_hash.glsl)

void node_hair_info(float hair_length,
                    out float is_strand,
                    out float intercept,
                    out float out_length,
                    out float thickness,
                    out vec3 tangent,
                    out float random)
{
  is_strand = float(g_data.is_strand);
  intercept = g_data.hair_time;
  thickness = g_data.hair_thickness;
  out_length = hair_length;
  tangent = g_data.T;
  /* TODO: could be precomputed per strand instead. */
  random = wang_hash_noise(uint(g_data.hair_strand_id));
}