forked from bartvdbraak/blender
Fix T75539: Cycles missing geometry update when switching displacement method
The shaders were not tagged for a needed geometry update when the displacement method was modified, neither were the Geometry and Object managers. Reviewed By: kevindietrich Maniphest Tasks: T75539 Differential Revision: https://developer.blender.org/D8896
This commit is contained in:
parent
4b0396695c
commit
68d5ad9983
@ -347,9 +347,16 @@ void Shader::tag_update(Scene *scene)
|
||||
foreach (ShaderNode *node, graph->nodes)
|
||||
node->attributes(this, &attributes);
|
||||
|
||||
if (has_displacement && displacement_method == DISPLACE_BOTH) {
|
||||
if (has_displacement) {
|
||||
if (displacement_method == DISPLACE_BOTH) {
|
||||
attributes.add(ATTR_STD_POSITION_UNDISPLACED);
|
||||
}
|
||||
if (displacement_method_is_modified()) {
|
||||
need_update_geometry = true;
|
||||
scene->geometry_manager->need_update = true;
|
||||
scene->object_manager->need_flags_update = true;
|
||||
}
|
||||
}
|
||||
|
||||
/* compare if the attributes changed, mesh manager will check
|
||||
* need_update_geometry, update the relevant meshes and clear it. */
|
||||
|
Loading…
Reference in New Issue
Block a user