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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user