Blender V5.3
gpu_shader_material_hair_info.bsl.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2019-2022 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
9
10[[node]]
11void node_hair_info(float hair_intercept,
12 float hair_length,
13 const ShadingData &sd,
14 float &is_strand,
15 float &out_intercept,
16 float &out_length,
17 float &thickness,
18 float3 &normal,
19 float &random)
20{
21 is_strand = float(sd.is_strand);
22 out_intercept = hair_intercept;
23 out_length = hair_length;
24 thickness = sd.hair_diameter;
25 normal = sd.curve_N;
26 /* TODO: could be precomputed per strand instead. */
28}
float wang_hash_noise(uint s)
void node_hair_info(float hair_intercept, float hair_length, const ShadingData &sd, float &is_strand, float &out_intercept, float &out_length, float &thickness, float3 &normal, float &random)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
packed_float3 curve_N