Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_bsdf_translucent.c
| Show All 34 Lines | static bNodeSocketTemplate sh_node_bsdf_translucent_in[] = { | ||||
| { -1, 0, "" } | { -1, 0, "" } | ||||
| }; | }; | ||||
| static bNodeSocketTemplate sh_node_bsdf_translucent_out[] = { | static bNodeSocketTemplate sh_node_bsdf_translucent_out[] = { | ||||
| { SOCK_SHADER, 0, N_("BSDF")}, | { SOCK_SHADER, 0, N_("BSDF")}, | ||||
| { -1, 0, "" } | { -1, 0, "" } | ||||
| }; | }; | ||||
| static int node_shader_gpu_bsdf_translucent(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) | static int node_shader_gpu_bsdf_translucent(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) | ||||
| { | { | ||||
| /* Color */ | |||||
| GPU_uniformbuffer_link_in(mat, &node->inputs, in, GPU_VEC4, 0); | |||||
| if (!in[1].link) | if (!in[1].link) | ||||
| GPU_link(mat, "world_normals_get", &in[1].link); | GPU_link(mat, "world_normals_get", &in[1].link); | ||||
| return GPU_stack_link(mat, "node_bsdf_translucent", in, out); | return GPU_stack_link(mat, "node_bsdf_translucent", in, out); | ||||
| } | } | ||||
| /* node type definition */ | /* node type definition */ | ||||
| void register_node_type_sh_bsdf_translucent(void) | void register_node_type_sh_bsdf_translucent(void) | ||||
| Show All 12 Lines | |||||