Blender V5.3
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
8
9[[node]]
10void 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}
#define layer
SamplerBase< float, 1, false, true > sampler1DArray
TEX_TEMPLATE DataVec texture(T, FltCoord, float=0.0f) RET
void node_blackbody(float temperature, sampler1DArray spectrummap, float layer, float4 &color)