Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.c
| Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | static bNodeSocketTemplate sh_node_subsurface_scattering_out[] = { | ||||
| { -1, 0, "" } | { -1, 0, "" } | ||||
| }; | }; | ||||
| static void node_shader_init_subsurface_scattering(bNodeTree *UNUSED(ntree), bNode *node) | static void node_shader_init_subsurface_scattering(bNodeTree *UNUSED(ntree), bNode *node) | ||||
| { | { | ||||
| node->custom1 = SHD_SUBSURFACE_BURLEY; | node->custom1 = SHD_SUBSURFACE_BURLEY; | ||||
| } | } | ||||
| static int node_shader_gpu_subsurface_scattering(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) | static int node_shader_gpu_subsurface_scattering(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) | ||||
| { | { | ||||
| if (!in[5].link) | if (!in[5].link) | ||||
| GPU_link(mat, "world_normals_get", &in[5].link); | GPU_link(mat, "world_normals_get", &in[5].link); | ||||
| return GPU_stack_link(mat, "node_subsurface_scattering", in, out); | return GPU_stack_link(mat, node, "node_subsurface_scattering", in, out); | ||||
| } | } | ||||
| static void node_shader_update_subsurface_scattering(bNodeTree *UNUSED(ntree), bNode *node) | static void node_shader_update_subsurface_scattering(bNodeTree *UNUSED(ntree), bNode *node) | ||||
| { | { | ||||
| bNodeSocket *sock; | bNodeSocket *sock; | ||||
| int falloff = node->custom1; | int falloff = node->custom1; | ||||
| for (sock = node->inputs.first; sock; sock = sock->next) { | for (sock = node->inputs.first; sock; sock = sock->next) { | ||||
| Show All 27 Lines | |||||