Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_sepcombRGB.cc
| Show All 22 Lines | |||||
| #include "node_shader_util.h" | #include "node_shader_util.h" | ||||
| namespace blender::nodes { | namespace blender::nodes { | ||||
| static void sh_node_seprgb_declare(NodeDeclarationBuilder &b) | static void sh_node_seprgb_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.is_function_node(); | b.is_function_node(); | ||||
| b.add_input<decl::Color>("Image").default_value({0.8f, 0.8f, 0.8f, 1.0f}); | b.add_input<decl::Color>(N_("Image")).default_value({0.8f, 0.8f, 0.8f, 1.0f}); | ||||
| b.add_output<decl::Float>("R"); | b.add_output<decl::Float>(N_("R")); | ||||
| b.add_output<decl::Float>("G"); | b.add_output<decl::Float>(N_("G")); | ||||
| b.add_output<decl::Float>("B"); | b.add_output<decl::Float>(N_("B")); | ||||
| }; | }; | ||||
| } // namespace blender::nodes | } // namespace blender::nodes | ||||
| static void node_shader_exec_seprgb(void *UNUSED(data), | static void node_shader_exec_seprgb(void *UNUSED(data), | ||||
| int UNUSED(thread), | int UNUSED(thread), | ||||
| bNode *UNUSED(node), | bNode *UNUSED(node), | ||||
| bNodeExecData *UNUSED(execdata), | bNodeExecData *UNUSED(execdata), | ||||
| ▲ Show 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | void register_node_type_sh_seprgb(void) | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||
| namespace blender::nodes { | namespace blender::nodes { | ||||
| static void sh_node_combrgb_declare(NodeDeclarationBuilder &b) | static void sh_node_combrgb_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.is_function_node(); | b.is_function_node(); | ||||
| b.add_input<decl::Float>("R").min(0.0f).max(1.0f); | b.add_input<decl::Float>(N_("R")).min(0.0f).max(1.0f); | ||||
| b.add_input<decl::Float>("G").min(0.0f).max(1.0f); | b.add_input<decl::Float>(N_("G")).min(0.0f).max(1.0f); | ||||
| b.add_input<decl::Float>("B").min(0.0f).max(1.0f); | b.add_input<decl::Float>(N_("B")).min(0.0f).max(1.0f); | ||||
| b.add_output<decl::Color>("Image"); | b.add_output<decl::Color>(N_("Image")); | ||||
| }; | }; | ||||
| } // namespace blender::nodes | } // namespace blender::nodes | ||||
| static void node_shader_exec_combrgb(void *UNUSED(data), | static void node_shader_exec_combrgb(void *UNUSED(data), | ||||
| int UNUSED(thread), | int UNUSED(thread), | ||||
| bNode *UNUSED(node), | bNode *UNUSED(node), | ||||
| bNodeExecData *UNUSED(execdata), | bNodeExecData *UNUSED(execdata), | ||||
| ▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines | |||||