Fix T86939: Cycles objects bounds not updated when transforming objects

As a rather premature optimization from rBbbe6d4492823, Object bounds
were only computed when either the Object or its Geometry were modified.
Prior to rB42198e9eb03b, this would work, as the Geometry was tagged as
modified if the Object's transform was also modified.

Since this tagging is not done anymore due to side effects, and since at
the time bounds are computed Objects were already processed and tag as
unmodified, the check on the modified status was always false.

For now remove this check, so the bounds are always unconditionally
updated. If this ever becomes a performance problem in large scenes with
motion blur, we will then try to find a way to nicely optimize it.

This would only affect BHV2 as OptiX and Embree handle object bounds
themselves.
This commit is contained in:
Kévin Dietrich 2021-03-26 10:49:43 +01:00
parent d982ea9a9e
commit ea12df51b8
Notes: blender-bot 2023-02-14 05:52:32 +01:00
Referenced by issue #86939, Cycles rendered view refresh on GPU
1 changed files with 0 additions and 4 deletions

View File

@ -153,10 +153,6 @@ void Object::update_motion()
void Object::compute_bounds(bool motion_blur)
{
if (!is_modified() && !geometry->is_modified()) {
return;
}
BoundBox mbounds = geometry->bounds;
if (motion_blur && use_motion()) {