Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/composite/nodes/node_composite_tonemap.cc
| Show All 34 Lines | static void cmp_node_tonemap_declare(NodeDeclarationBuilder &b) | ||||
| b.add_input<decl::Color>(N_("Image")).default_value({1.0f, 1.0f, 1.0f, 1.0f}); | b.add_input<decl::Color>(N_("Image")).default_value({1.0f, 1.0f, 1.0f, 1.0f}); | ||||
| b.add_output<decl::Color>(N_("Image")); | b.add_output<decl::Color>(N_("Image")); | ||||
| } | } | ||||
| } // namespace blender::nodes | } // namespace blender::nodes | ||||
| static void node_composit_init_tonemap(bNodeTree *UNUSED(ntree), bNode *node) | static void node_composit_init_tonemap(bNodeTree *UNUSED(ntree), bNode *node) | ||||
| { | { | ||||
| NodeTonemap *ntm = MEM_cnew<NodeTonemap>(__func__); | NodeTonemap *ntm = MEM_cnew<NodeTonemap>(MEM_AT); | ||||
| ntm->type = 1; | ntm->type = 1; | ||||
| ntm->key = 0.18; | ntm->key = 0.18; | ||||
| ntm->offset = 1; | ntm->offset = 1; | ||||
| ntm->gamma = 1; | ntm->gamma = 1; | ||||
| ntm->f = 0; | ntm->f = 0; | ||||
| ntm->m = 0; /* Actual value is set according to input. */ | ntm->m = 0; /* Actual value is set according to input. */ | ||||
| /* Default a of 1 works well with natural HDR images, but not always so for CGI. | /* Default a of 1 works well with natural HDR images, but not always so for CGI. | ||||
| * Maybe should use 0 or at least lower initial value instead. */ | * Maybe should use 0 or at least lower initial value instead. */ | ||||
| Show All 39 Lines | |||||