Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-06-01 13:26:36 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-06-01 17:49:52 +0300
commit4d8cf1329df3cf545acbe369e3d7c39428cf91d2 (patch)
tree40e345d43babf2b61594d53f0d1fb5bf8834e025 /intern/cycles/render/shader.cpp
parent36ef6d1532293a29701e658590c76f06af1f00a8 (diff)
Cycles: Add bump feature for selective nodes compilation
For now it is unused in the kernel, actual usage will come with the next commits.
Diffstat (limited to 'intern/cycles/render/shader.cpp')
-rw-r--r--intern/cycles/render/shader.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/intern/cycles/render/shader.cpp b/intern/cycles/render/shader.cpp
index 667279360c3..2f8eabbf0a9 100644
--- a/intern/cycles/render/shader.cpp
+++ b/intern/cycles/render/shader.cpp
@@ -487,6 +487,7 @@ void ShaderManager::get_requested_features(Scene *scene, int& max_group, int& fe
features = 0;
for(int i = 0; i < scene->shaders.size(); i++) {
Shader *shader = scene->shaders[i];
+ /* Gather requested features from all the nodes from the graph nodes. */
foreach(ShaderNode *node, shader->graph->nodes) {
max_group = min(max_group, node->get_group());
features |= node->get_feature();
@@ -497,6 +498,11 @@ void ShaderManager::get_requested_features(Scene *scene, int& max_group, int& fe
}
}
}
+ /* Gather requested features from the graph itself. */
+ ShaderNode *output_node = shader->graph->output();
+ if(output_node->input("Displacement")->link != NULL) {
+ features |= NODE_FEATURE_BUMP;
+ }
}
}