Cycles: Implement preliminary test for volume stack update from SSS
This adds an AABB collision check for objects with volumes and if there's a collision detected then the object will have SD_OBJECT_INTERSECTS_VOLUME flag. This solves a speed regression introduced by the fix for T39823 by skipping volume stack update in cases no volumes intersects the current SSS object.
This commit is contained in:
@@ -75,8 +75,14 @@ void Object::compute_bounds(bool motion_blur)
|
||||
bounds.grow(mbounds.transformed(&ttfm));
|
||||
}
|
||||
}
|
||||
else
|
||||
bounds = mbounds.transformed(&tfm);
|
||||
else {
|
||||
if(mesh->transform_applied) {
|
||||
bounds = mbounds;
|
||||
}
|
||||
else {
|
||||
bounds = mbounds.transformed(&tfm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Object::apply_transform(bool apply_to_motion)
|
||||
@@ -410,9 +416,6 @@ void ObjectManager::device_update(Device *device, DeviceScene *dscene, Scene *sc
|
||||
progress.set_status("Updating Objects", "Applying Static Transformations");
|
||||
apply_static_transforms(dscene, scene, object_flag, progress);
|
||||
}
|
||||
|
||||
/* allocate object flag */
|
||||
device->tex_alloc("__object_flag", dscene->object_flag);
|
||||
}
|
||||
|
||||
void ObjectManager::device_free(Device *device, DeviceScene *dscene)
|
||||
|
Reference in New Issue
Block a user