Blender V4.3
node_composite_exposure.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2020 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#include "GPU_material.hh"
10
11#include "COM_shader_node.hh"
12
14
15/* **************** Exposure ******************** */
16
18
20{
21 b.add_input<decl::Color>("Image")
22 .default_value({1.0f, 1.0f, 1.0f, 1.0f})
23 .compositor_domain_priority(0);
24 b.add_input<decl::Float>("Exposure").min(-10.0f).max(10.0f).compositor_domain_priority(1);
25 b.add_output<decl::Color>("Image");
26}
27
28using namespace blender::realtime_compositor;
29
31 public:
33
34 void compile(GPUMaterial *material) override
35 {
38
39 GPU_stack_link(material, &bnode(), "node_composite_exposure", inputs, outputs);
40 }
41};
42
44{
45 return new ExposureShaderNode(node);
46}
47
48} // namespace blender::nodes::node_composite_exposure_cc
49
51{
53
54 static blender::bke::bNodeType ntype;
55
56 cmp_node_type_base(&ntype, CMP_NODE_EXPOSURE, "Exposure", NODE_CLASS_OP_COLOR);
57 ntype.declare = file_ns::cmp_node_exposure_declare;
58 ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;
59
61}
#define NODE_CLASS_OP_COLOR
Definition BKE_node.hh:406
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
local_group_size(16, 16) .push_constant(Type b
void node_register_type(bNodeType *ntype)
Definition node.cc:1708
static void cmp_node_exposure_declare(NodeDeclarationBuilder &b)
static ShaderNode * get_compositor_shader_node(DNode node)
void register_node_type_cmp_exposure()
void cmp_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
#define min(a, b)
Definition sort.c:32
Defines a node type.
Definition BKE_node.hh:218
NodeDeclareFunction declare
Definition BKE_node.hh:347
NodeGetCompositorShaderNodeFunction get_compositor_shader_node
Definition BKE_node.hh:328