diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2019-09-20 11:55:46 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2019-09-24 10:44:19 +0300 |
commit | 36683475d14ca5ff3190461ac378ea8b291330e4 (patch) | |
tree | 4a31cb038b58bd9c2dad689a14d2ca1f7b2afb1c /intern/cycles | |
parent | 5a6ab6f594688eecec8b7ab9b6943557dfdd81ba (diff) |
Fix T68457: Cycles OpenCL Displacement Shading
When doing simple scenes the displacement shading failed during final
rendering when the displacement method is set to `Displacement + Bump`.
When this option is enabled the shader uses the Vector math
node. This node is part of the node group level 1. When doing simple
shading only using nodes that are part of the node group level
0 the shading was rendered black.
This only happened in final rendering as there the OpenCL programs are
optimized to save registries. Viewport rendering rendered correctly
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5859
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/render/shader.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/intern/cycles/render/shader.cpp b/intern/cycles/render/shader.cpp index ec85e516832..e777b2e982b 100644 --- a/intern/cycles/render/shader.cpp +++ b/intern/cycles/render/shader.cpp @@ -703,6 +703,7 @@ void ShaderManager::get_requested_features(Scene *scene, requested_features->nodes_features |= NODE_FEATURE_BUMP; if (shader->displacement_method == DISPLACE_BOTH) { 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 |