diff options
author | Jeroen Bakker <jbakker> | 2021-09-24 08:42:36 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-09-24 08:44:22 +0300 |
commit | 6a88f83d679f281d7adb3798ab4770069a63c2da (patch) | |
tree | 02b6e3870e7651c40c63eb23285e7f2ff3f2507e /source/blender/gpu/shaders/material/gpu_shader_material_hair_info.glsl | |
parent | 0f764ade1a2fd8aa9c462dd5850e8be52aa203f5 (diff) |
Hair Info Length Attribute
Goal is to add the length attribute to the Hair Info node, for better control over color gradients or similar along the hair.
Reviewed By: #eevee_viewport, brecht
Differential Revision: https://developer.blender.org/D10481
Diffstat (limited to 'source/blender/gpu/shaders/material/gpu_shader_material_hair_info.glsl')
-rw-r--r-- | source/blender/gpu/shaders/material/gpu_shader_material_hair_info.glsl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/gpu/shaders/material/gpu_shader_material_hair_info.glsl b/source/blender/gpu/shaders/material/gpu_shader_material_hair_info.glsl index 6330daa4391..6ffa6b59572 100644 --- a/source/blender/gpu/shaders/material/gpu_shader_material_hair_info.glsl +++ b/source/blender/gpu/shaders/material/gpu_shader_material_hair_info.glsl @@ -10,12 +10,15 @@ float wang_hash_noise(uint s) return fract(float(s) / 4294967296.0); } -void node_hair_info(out float is_strand, +void node_hair_info(float hair_length, + out float is_strand, out float intercept, + out float length, out float thickness, out vec3 tangent, out float random) { + length = hair_length; #ifdef HAIR_SHADER is_strand = 1.0; intercept = hairTime; |