18 .default_value(1500.0f)
32 float *data =
static_cast<float *
>(
MEM_mallocN(
sizeof(
float) * size * 4,
"blackbody texture"));
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);
74 ntype.
declare = file_ns::node_declare;
76 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)
void set_matching_fn(const mf::MultiFunction *fn)
local_group_size(16, 16) .push_constant(Type b
void *(* MEM_mallocN)(size_t len, const char *str)
void node_type_size_preset(bNodeType *ntype, eNodeSizePreset size)
void node_register_type(bNodeType *ntype)
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 sh_fn_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
NodeMaterialXFunction materialx_fn
NodeGPUExecFunction gpu_fn
NodeMultiFunctionBuildFunction build_multi_function
NodeDeclareFunction declare