Blender
V5.3
source
blender
gpu
shaders
material
gpu_shader_material_blackbody.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_compat.hh
"
8
9
[[
node
]]
10
void
node_blackbody
(
float
temperature,
sampler1DArray
spectrummap,
float
layer
,
float4
&color)
11
{
12
float
t = (temperature - 800.0f) / (12000.0f - 800.0f);
13
color =
float4
(
texture
(spectrummap,
float2
(t,
layer
)).rgb, 1.0f);
14
}
gpu_shader_compat.hh
layer
#define layer
Definition
gpu_shader_cxx_attribute.hh:69
node
#define node
Definition
gpu_shader_cxx_attribute.hh:142
sampler1DArray
SamplerBase< float, 1, false, true > sampler1DArray
Definition
gpu_shader_cxx_sampler.hh:75
texture
TEX_TEMPLATE DataVec texture(T, FltCoord, float=0.0f) RET
node_blackbody
void node_blackbody(float temperature, sampler1DArray spectrummap, float layer, float4 &color)
Definition
gpu_shader_material_blackbody.bsl.hh:10
float2
Definition
types_float2.h:13
float4
Definition
sky_math.h:224
Generated on
for Blender by
doxygen
1.18.0