Blender
V5.3
intern
cycles
kernel
svm
blackbody.h
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2009-2010 Sony Pictures Imageworks Inc., et al. All Rights Reserved.
2
* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
3
*
4
* SPDX-License-Identifier: BSD-3-Clause
5
*
6
* Adapted code from Open Shading Language. */
7
8
#pragma once
9
10
#include "
kernel/globals.h
"
11
12
#include "
kernel/svm/math_util.h
"
13
#include "
kernel/svm/node_types.h
"
14
#include "
kernel/svm/util.h
"
15
16
#include "
kernel/util/colorspace.h
"
17
18
CCL_NAMESPACE_BEGIN
19
20
/* Blackbody Node */
21
22
ccl_device_noinline
void
svm_node_blackbody
(
KernelGlobals
kg,
23
ccl_private
float
*
ccl_restrict
stack,
24
const
ccl_global
SVMNodeBlackbody
&
ccl_restrict
node
)
25
{
26
/* Input */
27
const
float
temperature =
stack_load
(stack,
node
.temperature);
28
29
float3
color_rgb =
rec709_to_rgb
(kg,
svm_math_blackbody_color_rec709
(temperature));
30
color_rgb =
max
(color_rgb,
zero_float3
());
31
32
stack_store_float3
(stack,
node
.color_offset, color_rgb);
33
}
34
35
CCL_NAMESPACE_END
svm_node_blackbody
CCL_NAMESPACE_BEGIN ccl_device_noinline void svm_node_blackbody(KernelGlobals kg, ccl_private float *ccl_restrict stack, const ccl_global SVMNodeBlackbody &ccl_restrict node)
Definition
blackbody.h:22
max
btScalar max
Definition
btHeightfieldTerrainShape.h:79
util.h
stack_store_float3
ccl_device_inline void stack_store_float3(ccl_private float *stack, const uint a, const float3 f)
Definition
cycles/kernel/svm/util.h:152
stack_load
ccl_device_inline T stack_load(const ccl_private float *stack, const uint a)
Definition
cycles/kernel/svm/util.h:62
ccl_restrict
#define ccl_restrict
ccl_private
#define ccl_private
ccl_global
#define ccl_global
ccl_device_noinline
#define ccl_device_noinline
CCL_NAMESPACE_END
#define CCL_NAMESPACE_END
Definition
device/cuda/compat.h:10
globals.h
node
#define node
Definition
gpu_shader_cxx_attribute.hh:142
colorspace.h
rec709_to_rgb
ccl_device float3 rec709_to_rgb(KernelGlobals kg, const float3 rec709)
Definition
kernel/util/colorspace.h:26
zero_float3
CCL_NAMESPACE_BEGIN ccl_device_inline float3 zero_float3()
Definition
math_float3.h:17
math_util.h
svm_math_blackbody_color_rec709
ccl_device float3 svm_math_blackbody_color_rec709(const float t)
Definition
math_util.h:211
CCL_NAMESPACE_BEGIN
Definition
python.cpp:41
node_types.h
KernelGlobals
Definition
eevee_nodetree_lib.bsl.hh:141
SVMNodeBlackbody
Definition
node_types.h:311
float3
Definition
sky_math.h:135
Generated on
for Blender by
doxygen
1.18.0