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>2017-04-21 13:56:54 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-04-21 15:41:42 +0300
commit9781139590dbbeb6d246d4fbafa8ab1a4696c7fb (patch)
tree9275a763d008ecbe1d11249371897c6ec99a46d7 /intern/cycles/render/shader.cpp
parentb6da2a6a86fb948f11f9147c5ed722a064673e6d (diff)
Cycles: Solve speed regression of classroom scene after principled commit
This way we can skip it from compiling into OpenCL kernels by making this shader compile-time feature.
Diffstat (limited to 'intern/cycles/render/shader.cpp')
-rw-r--r--intern/cycles/render/shader.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/cycles/render/shader.cpp b/intern/cycles/render/shader.cpp
index 23eee1916bd..a7d42a4b4a0 100644
--- a/intern/cycles/render/shader.cpp
+++ b/intern/cycles/render/shader.cpp
@@ -569,6 +569,9 @@ void ShaderManager::get_requested_graph_features(ShaderGraph *graph,
if(CLOSURE_IS_VOLUME(bsdf_node->closure)) {
requested_features->nodes_features |= NODE_FEATURE_VOLUME;
}
+ else if(CLOSURE_IS_PRINCIPLED(bsdf_node->closure)) {
+ requested_features->use_principled = true;
+ }
}
if(node->has_surface_bssrdf()) {
requested_features->use_subsurface = true;