Fix T86880: Cycles bevel shader not working after editing world

This commit is contained in:
Brecht Van Lommel 2021-04-12 20:10:07 +02:00
parent d2f55be7bb
commit 2b9e6943cd
Notes: blender-bot 2023-02-14 06:45:14 +01:00
Referenced by issue #86880, Cycles: Bevel node stop working after changing world shader
1 changed files with 5 additions and 1 deletions

View File

@ -1364,7 +1364,6 @@ void GeometryManager::device_update_bvh(Device *device,
}
dscene->data.bvh.root = pack.root_index;
dscene->data.bvh.bvh_layout = bparams.bvh_layout;
dscene->data.bvh.use_bvh_steps = (scene->params.num_bvh_time_steps != 0);
dscene->data.bvh.curve_subdivisions = scene->params.curve_subdivisions();
/* The scene handle is set in 'CPUDevice::const_copy_to' and 'OptiXDevice::const_copy_to' */
@ -1984,6 +1983,11 @@ void GeometryManager::device_update(Device *device,
}
}
/* Always set BVH layout again after displacement where it was set to none,
* to avoid ray-tracing at that stage. */
dscene->data.bvh.bvh_layout = BVHParams::best_bvh_layout(scene->params.bvh_layout,
device->get_bvh_layout_mask());
{
scoped_callback_timer timer([scene](double time) {
if (scene->update_stats) {