Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_bsdf_refraction.c
| Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | static bNodeSocketTemplate sh_node_bsdf_refraction_out[] = { | ||||
| { -1, 0, "" } | { -1, 0, "" } | ||||
| }; | }; | ||||
| static void node_shader_init_refraction(bNodeTree *UNUSED(ntree), bNode *node) | static void node_shader_init_refraction(bNodeTree *UNUSED(ntree), bNode *node) | ||||
| { | { | ||||
| node->custom1 = SHD_GLOSSY_BECKMANN; | node->custom1 = SHD_GLOSSY_BECKMANN; | ||||
| } | } | ||||
| static int node_shader_gpu_bsdf_refraction(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) | static int node_shader_gpu_bsdf_refraction(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) | ||||
| { | { | ||||
| if (!in[3].link) | if (!in[3].link) | ||||
| GPU_link(mat, "world_normals_get", &in[3].link); | GPU_link(mat, "world_normals_get", &in[3].link); | ||||
| return GPU_stack_link(mat, "node_bsdf_refraction", in, out); | return GPU_stack_link(mat, node, "node_bsdf_refraction", in, out); | ||||
| } | } | ||||
| /* node type definition */ | /* node type definition */ | ||||
| void register_node_type_sh_bsdf_refraction(void) | void register_node_type_sh_bsdf_refraction(void) | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| sh_node_type_base(&ntype, SH_NODE_BSDF_REFRACTION, "Refraction BSDF", NODE_CLASS_SHADER, 0); | sh_node_type_base(&ntype, SH_NODE_BSDF_REFRACTION, "Refraction BSDF", NODE_CLASS_SHADER, 0); | ||||
| Show All 9 Lines | |||||