Blender
V5.3
source
blender
gpu
shaders
material
gpu_shader_material_emission.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_material_interface.bsl.hh
"
8
9
[[
node
]]
10
void
node_emission
(
float4
color,
11
float
strength,
12
float
weight,
13
KernelGlobals
&kg,
14
ShadingData
&sd,
15
Closure
&result)
16
{
17
color =
max
(color,
float4
(0.0f));
18
strength =
max
(strength, 0.0f);
19
20
ClosureEmission emission_data;
21
emission_data.emission = color.rgb * (strength * weight);
22
23
result =
closure_eval
(kg, sd, emission_data);
24
}
max
btScalar max
Definition
btHeightfieldTerrainShape.h:79
Closure
#define Closure
Definition
eevee_nodetree_closures_lib.bsl.hh:10
closure_eval
Closure closure_eval(KernelGlobals &kg, ShadingData &sd, ClosureDiffuse diffuse)
Definition
eevee_nodetree_lib.bsl.hh:270
node
#define node
Definition
gpu_shader_cxx_attribute.hh:142
node_emission
void node_emission(float4 color, float strength, float weight, KernelGlobals &kg, ShadingData &sd, Closure &result)
Definition
gpu_shader_material_emission.bsl.hh:10
gpu_shader_material_interface.bsl.hh
KernelGlobals
Definition
eevee_nodetree_lib.bsl.hh:141
ShadingData
Definition
eevee_nodetree_lib.bsl.hh:56
float4
Definition
sky_math.h:224
Generated on
for Blender by
doxygen
1.18.0