Blender
V5.3
source
blender
gpu
shaders
material
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
7
#include "
gpu_shader_common_hash.bsl.hh
"
8
#include "
gpu_shader_material_interface.bsl.hh
"
9
10
[[
node
]]
11
void
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. */
27
random
=
wang_hash_noise
(uint(sd.
hair_strand_id
));
28
}
gpu_shader_common_hash.bsl.hh
wang_hash_noise
float wang_hash_noise(uint s)
Definition
gpu_shader_common_hash.bsl.hh:320
node
#define node
Definition
gpu_shader_cxx_attribute.hh:142
node_hair_info
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)
Definition
gpu_shader_material_hair_info.bsl.hh:11
gpu_shader_material_interface.bsl.hh
random
Definition
eevee_sampling_lib.bsl.hh:85
float
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
Definition
shadow_state_template.h:80
ShadingData
Definition
eevee_nodetree_lib.bsl.hh:56
ShadingData::is_strand
bool is_strand
Definition
eevee_nodetree_lib.bsl.hh:85
ShadingData::curve_N
packed_float3 curve_N
Definition
eevee_nodetree_lib.bsl.hh:68
ShadingData::hair_diameter
float hair_diameter
Definition
eevee_nodetree_lib.bsl.hh:73
ShadingData::hair_strand_id
int hair_strand_id
Definition
eevee_nodetree_lib.bsl.hh:75
float3
Definition
sky_math.h:135
Generated on
for Blender by
doxygen
1.18.0