Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_material.c
| Show First 20 Lines • Show All 261 Lines • ▼ Show 20 Lines | if (node->id) { | ||||
| if (node->custom1 & SH_NODE_MAT_NEG) | if (node->custom1 & SH_NODE_MAT_NEG) | ||||
| GPU_link(mat, "vec_math_negate", shi.vn, &shi.vn); | GPU_link(mat, "vec_math_negate", shi.vn, &shi.vn); | ||||
| if (node->type == SH_NODE_MATERIAL_EXT) { | if (node->type == SH_NODE_MATERIAL_EXT) { | ||||
| if (hasinput[MAT_IN_AMB]) | if (hasinput[MAT_IN_AMB]) | ||||
| shi.amb = gpu_get_input_link(&in[MAT_IN_AMB]); | shi.amb = gpu_get_input_link(&in[MAT_IN_AMB]); | ||||
| if (hasinput[MAT_IN_EMIT]) | if (hasinput[MAT_IN_EMIT]) | ||||
| shi.emit = gpu_get_input_link(&in[MAT_IN_EMIT]); | shi.emit = gpu_get_input_link(&in[MAT_IN_EMIT]); | ||||
| if (hasinput[MAT_IN_SPECTRA]) | |||||
| shi.spectra = gpu_get_input_link(&in[MAT_IN_SPECTRA]); | |||||
| if (hasinput[MAT_IN_ALPHA]) | if (hasinput[MAT_IN_ALPHA]) | ||||
| shi.alpha = gpu_get_input_link(&in[MAT_IN_ALPHA]); | shi.alpha = gpu_get_input_link(&in[MAT_IN_ALPHA]); | ||||
| } | } | ||||
| GPU_shaderesult_set(&shi, &shr); /* clears shr */ | GPU_shaderesult_set(&shi, &shr); /* clears shr */ | ||||
| /* write to outputs */ | /* write to outputs */ | ||||
| if (node->custom1 & SH_NODE_MAT_DIFF) { | if (node->custom1 & SH_NODE_MAT_DIFF) { | ||||
| ▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines | |||||