diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-04-12 21:10:07 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-04-12 21:10:30 +0300 |
commit | 2b9e6943cdf5a892b874ce03ec0dea9d7b5399ff (patch) | |
tree | 6a3e7f14086d0beb77dd27a0207ba20bde913670 /intern/cycles/render | |
parent | d2f55be7bbacab0c784bc35001a2840c4046b660 (diff) |
Fix T86880: Cycles bevel shader not working after editing world
Diffstat (limited to 'intern/cycles/render')
-rw-r--r-- | intern/cycles/render/geometry.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/intern/cycles/render/geometry.cpp b/intern/cycles/render/geometry.cpp index 8b0c0d94155..bd2b8164cbb 100644 --- a/intern/cycles/render/geometry.cpp +++ b/intern/cycles/render/geometry.cpp @@ -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) { |