18 .default_value(6500.0f)
44 static auto fn = mf::build::SI1_SO<float, ColorGeometry4f>(
"Blackbody", [](
float temperature) {
55 NodeItem temperature = get_input_value(
"Temperature", NodeItem::Type::Float);
57 NodeItem res = create_node(
"blackbody", NodeItem::Type::Color3);
58 res.set_input(
"temperature", temperature);
75 ntype.
ui_description =
"Convert a blackbody temperature to an RGB value";
78 ntype.
declare = file_ns::node_declare;
80 ntype.
gpu_fn = file_ns::node_shader_gpu_blackbody;
#define NODE_CLASS_CONVERTER
#define SH_NODE_BLACKBODY
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
GPUNodeLink * GPU_constant(const float *num)
GPUNodeLink * GPU_color_band(GPUMaterial *mat, int size, float *pixels, float *r_row)
void IMB_colormanagement_blackbody_temperature_to_rgb_table(float *r_table, int width, float min, float max)
void IMB_colormanagement_blackbody_temperature_to_rgb(float r_dest[4], float value)
BMesh const char void * data
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
void set_matching_fn(const mf::MultiFunction *fn)
void * MEM_malloc_arrayN(size_t len, size_t size, const char *str)
void node_register_type(bNodeType &ntype)
void node_type_size_preset(bNodeType &ntype, eNodeSizePreset size)
static void sh_node_blackbody_build_multi_function(nodes::NodeMultiFunctionBuilder &builder)
static void node_declare(NodeDeclarationBuilder &b)
static int node_shader_gpu_blackbody(GPUMaterial *mat, bNode *node, bNodeExecData *, GPUNodeStack *in, GPUNodeStack *out)
ColorSceneLinear4f< eAlpha::Premultiplied > ColorGeometry4f
#define NODE_SHADER_MATERIALX_BEGIN
#define NODE_SHADER_MATERIALX_END
void register_node_type_sh_blackbody()
void common_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
NodeMaterialXFunction materialx_fn
std::string ui_description
NodeGPUExecFunction gpu_fn
NodeMultiFunctionBuildFunction build_multi_function
const char * enum_name_legacy
NodeDeclareFunction declare