17 b.use_custom_socket_order();
18 b.allow_any_socket_order();
21 .default_value({1.0f, 1.0f, 1.0f, 1.0f})
23 .
description(
"Color input on which correction will be applied");
24 b.add_output<
decl::Color>(
"Color").align_with_previous();
32 "Gamma correction value, applied as color^gamma.\n"
33 "Gamma controls the relative intensity of the mid-tones compared to the full black and "
50 static auto fn = mf::build::SI2_SO<ColorGeometry4f, float, ColorGeometry4f>(
57 mf::build::exec_presets::SomeSpanOrSingle<0>());
64 NodeItem
color = get_input_value(
"Color", NodeItem::Type::Color3);
65 NodeItem gamma = get_input_value(
"Gamma", NodeItem::Type::Float);
84 ntype.
declare = file_ns::node_declare;
85 ntype.
gpu_fn = file_ns::node_shader_gpu_gamma;
#define NODE_CLASS_OP_COLOR
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
void set_matching_fn(const mf::MultiFunction *fn)
void node_register_type(bNodeType &ntype)
T safe_pow(const T &x, const T &power)
static void node_build_multi_function(blender::nodes::NodeMultiFunctionBuilder &builder)
static int node_shader_gpu_gamma(GPUMaterial *mat, bNode *node, bNodeExecData *, GPUNodeStack *in, GPUNodeStack *out)
static void node_declare(NodeDeclarationBuilder &b)
ColorSceneLinear4f< eAlpha::Premultiplied > ColorGeometry4f
VecBase< float, 3 > float3
#define NODE_SHADER_MATERIALX_BEGIN
#define NODE_SHADER_MATERIALX_END
void register_node_type_sh_gamma()
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