Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/render/shader.cpp
| Show First 20 Lines • Show All 697 Lines • ▼ Show 20 Lines | for (int i = 0; i < scene->shaders.size(); i++) { | ||||
| Shader *shader = scene->shaders[i]; | Shader *shader = scene->shaders[i]; | ||||
| /* Gather requested features from all the nodes from the graph nodes. */ | /* Gather requested features from all the nodes from the graph nodes. */ | ||||
| get_requested_graph_features(shader->graph, requested_features); | get_requested_graph_features(shader->graph, requested_features); | ||||
| ShaderNode *output_node = shader->graph->output(); | ShaderNode *output_node = shader->graph->output(); | ||||
| if (output_node->input("Displacement")->link != NULL) { | if (output_node->input("Displacement")->link != NULL) { | ||||
| requested_features->nodes_features |= NODE_FEATURE_BUMP; | requested_features->nodes_features |= NODE_FEATURE_BUMP; | ||||
| if (shader->displacement_method == DISPLACE_BOTH) { | if (shader->displacement_method == DISPLACE_BOTH) { | ||||
| requested_features->nodes_features |= NODE_FEATURE_BUMP_STATE; | requested_features->nodes_features |= NODE_FEATURE_BUMP_STATE; | ||||
| requested_features->max_nodes_group = max(requested_features->max_nodes_group, NODE_GROUP_LEVEL_1); | |||||
| } | } | ||||
| } | } | ||||
| /* On top of volume nodes, also check if we need volume sampling because | /* On top of volume nodes, also check if we need volume sampling because | ||||
| * e.g. an Emission node would slip through the NODE_FEATURE_VOLUME check */ | * e.g. an Emission node would slip through the NODE_FEATURE_VOLUME check */ | ||||
| if (shader->has_volume) | if (shader->has_volume) | ||||
| requested_features->use_volume |= true; | requested_features->use_volume |= true; | ||||
| } | } | ||||
| } | } | ||||
| Show All 34 Lines | |||||