Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_eevee_specular.c
| Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | static bNodeSocketTemplate sh_node_eevee_specular_in[] = { | ||||
| { -1, 0, "" } | { -1, 0, "" } | ||||
| }; | }; | ||||
| static bNodeSocketTemplate sh_node_eevee_specular_out[] = { | static bNodeSocketTemplate sh_node_eevee_specular_out[] = { | ||||
| { SOCK_SHADER, 0, N_("BSDF")}, | { SOCK_SHADER, 0, N_("BSDF")}, | ||||
| { -1, 0, "" } | { -1, 0, "" } | ||||
| }; | }; | ||||
| static int node_shader_gpu_eevee_specular(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) | static int node_shader_gpu_eevee_specular(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) | ||||
| { | { | ||||
| static float one = 1.0f; | static float one = 1.0f; | ||||
| /* Normals */ | /* Normals */ | ||||
| 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); | ||||
| } | } | ||||
| /* Clearcoat Normals */ | /* Clearcoat Normals */ | ||||
| if (!in[8].link) { | if (!in[8].link) { | ||||
| GPU_link(mat, "world_normals_get", &in[8].link); | GPU_link(mat, "world_normals_get", &in[8].link); | ||||
| } | } | ||||
| /* Occlusion */ | /* Occlusion */ | ||||
| if (!in[9].link) { | if (!in[9].link) { | ||||
| GPU_link(mat, "set_value", GPU_uniform(&one), &in[9].link); | GPU_link(mat, "set_value", GPU_uniform(&one), &in[9].link); | ||||
| } | } | ||||
| return GPU_stack_link(mat, "node_eevee_specular", in, out); | return GPU_stack_link(mat, node, "node_eevee_specular", in, out); | ||||
| } | } | ||||
| /* node type definition */ | /* node type definition */ | ||||
| void register_node_type_sh_eevee_specular(void) | void register_node_type_sh_eevee_specular(void) | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| Show All 9 Lines | |||||