Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_wireframe.c
- This file was moved from source/blender/nodes/shader/nodes/node_shader_wireframe.cc.
| Show All 11 Lines | |||||
| * You should have received a copy of the GNU General Public License | * You should have received a copy of the GNU General Public License | ||||
| * along with this program; if not, write to the Free Software Foundation, | * along with this program; if not, write to the Free Software Foundation, | ||||
| * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
| * | * | ||||
| * The Original Code is Copyright (C) 2005 Blender Foundation. | * The Original Code is Copyright (C) 2005 Blender Foundation. | ||||
| * All rights reserved. | * All rights reserved. | ||||
| */ | */ | ||||
| #include "node_shader_util.hh" | #include "../node_shader_util.h" | ||||
| /* **************** Wireframe ******************** */ | /* **************** Wireframe ******************** */ | ||||
| namespace blender::nodes::node_shader_wireframe_cc { | |||||
| static bNodeSocketTemplate sh_node_wireframe_in[] = { | static bNodeSocketTemplate sh_node_wireframe_in[] = { | ||||
| {SOCK_FLOAT, N_("Size"), 0.01f, 0.0f, 0.0f, 0.0f, 0.0f, 100.0f}, | {SOCK_FLOAT, N_("Size"), 0.01f, 0.0f, 0.0f, 0.0f, 0.0f, 100.0f}, | ||||
| {-1, ""}, | {-1, ""}, | ||||
| }; | }; | ||||
| static bNodeSocketTemplate sh_node_wireframe_out[] = { | static bNodeSocketTemplate sh_node_wireframe_out[] = { | ||||
| {SOCK_FLOAT, N_("Fac"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, | {SOCK_FLOAT, N_("Fac"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, | ||||
| {-1, ""}, | {-1, ""}, | ||||
| Show All 16 Lines | return GPU_stack_link(mat, | ||||
| node, | node, | ||||
| "node_wireframe", | "node_wireframe", | ||||
| in, | in, | ||||
| out, | out, | ||||
| GPU_builtin(GPU_BARYCENTRIC_TEXCO), | GPU_builtin(GPU_BARYCENTRIC_TEXCO), | ||||
| GPU_builtin(GPU_BARYCENTRIC_DIST)); | GPU_builtin(GPU_BARYCENTRIC_DIST)); | ||||
| } | } | ||||
| } // namespace blender::nodes::node_shader_wireframe_cc | |||||
| /* node type definition */ | /* node type definition */ | ||||
| void register_node_type_sh_wireframe() | void register_node_type_sh_wireframe(void) | ||||
| { | { | ||||
| namespace file_ns = blender::nodes::node_shader_wireframe_cc; | |||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| sh_node_type_base(&ntype, SH_NODE_WIREFRAME, "Wireframe", NODE_CLASS_INPUT, 0); | sh_node_type_base(&ntype, SH_NODE_WIREFRAME, "Wireframe", NODE_CLASS_INPUT, 0); | ||||
| node_type_socket_templates( | node_type_socket_templates(&ntype, sh_node_wireframe_in, sh_node_wireframe_out); | ||||
| &ntype, file_ns::sh_node_wireframe_in, file_ns::sh_node_wireframe_out); | node_type_init(&ntype, NULL); | ||||
| node_type_init(&ntype, nullptr); | node_type_storage(&ntype, "", NULL, NULL); | ||||
| node_type_storage(&ntype, "", nullptr, nullptr); | node_type_gpu(&ntype, node_shader_gpu_wireframe); | ||||
| node_type_gpu(&ntype, file_ns::node_shader_gpu_wireframe); | |||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||