24 b.use_custom_socket_order();
25 b.allow_any_socket_order();
28 .default_value({1.0f, 1.0f, 1.0f, 1.0f})
30 .
description(
"Color input on which correction will be applied");
31 b.add_output<
decl::Color>(
"Color"_ustr).align_with_previous();
39 "Gamma correction value, applied as color^gamma.\n"
40 "Gamma controls the relative intensity of the mid-tones compared to the full black and "
57 static auto fn = mf::build::SI2_SO<ColorGeometry4f, float, ColorGeometry4f>(
64 mf::build::exec_presets::SomeSpanOrSingle<0>());
71 NodeItem
color = get_input_value(
"Color", NodeItem::Type::Color3);
72 NodeItem gamma = get_input_value(
"Gamma", NodeItem::Type::Float);
91 ntype.
declare = file_ns::node_declare;
92 ntype.
gpu_fn = file_ns::node_shader_gpu_gamma;
#define NODE_CLASS_OP_COLOR
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(nodes::NodeMultiFunctionBuilder &builder)
static int node_shader_gpu_gamma(GPUMaterial *mat, bNode *node, bNodeExecData *, GPUNodeStack *in, GPUNodeStack *out)
static void node_declare(NodeDeclarationBuilder &b)
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
void register_node_type_sh_gamma()
ColorSceneLinear4f< eAlpha::Premultiplied > ColorGeometry4f
VecBase< float, 3 > float3
void common_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
#define NODE_SHADER_MATERIALX_BEGIN
#define NODE_SHADER_MATERIALX_END
NodeMaterialXFunction materialx_fn
std::string ui_description
NodeGPUExecFunction gpu_fn
NodeMultiFunctionBuildFunction build_multi_function
const char * enum_name_legacy
NodeDeclareFunction declare