Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/node_shader_tree.c
| Show First 20 Lines • Show All 838 Lines • ▼ Show 20 Lines | void ntreeGPUMaterialNodes(bNodeTree *localtree, GPUMaterial *mat, bool *has_surface_output, bool *has_volume_output) | ||||
| /* TODO(fclem): consider moving this to the gpu shader tree evaluation. */ | /* TODO(fclem): consider moving this to the gpu shader tree evaluation. */ | ||||
| nTreeTags tags = { | nTreeTags tags = { | ||||
| .ssr_id = 1.0, | .ssr_id = 1.0, | ||||
| .sss_id = 1.0, | .sss_id = 1.0, | ||||
| }; | }; | ||||
| ntree_shader_tag_nodes(localtree, output, &tags); | ntree_shader_tag_nodes(localtree, output, &tags); | ||||
| exec = ntreeShaderBeginExecTree(localtree); | exec = ntreeShaderBeginExecTree(localtree); | ||||
| ntreeExecGPUNodes(exec, mat, 1); | ntreeExecGPUNodes(exec, mat, output); | ||||
| ntreeShaderEndExecTree(exec); | ntreeShaderEndExecTree(exec); | ||||
| /* EEVEE: Find which material domain was used (volume, surface ...). */ | /* EEVEE: Find which material domain was used (volume, surface ...). */ | ||||
| *has_surface_output = false; | *has_surface_output = false; | ||||
| *has_volume_output = false; | *has_volume_output = false; | ||||
| if (output != NULL) { | if (output != NULL) { | ||||
| bNodeSocket *surface_sock = ntree_shader_node_find_input(output, "Surface"); | bNodeSocket *surface_sock = ntree_shader_node_find_input(output, "Surface"); | ||||
| ▲ Show 20 Lines • Show All 111 Lines • Show Last 20 Lines | |||||