Merge branch 'blender-v2.91-release'

This commit is contained in:
Brecht Van Lommel 2020-10-30 17:37:23 +01:00
commit 0270223552
2 changed files with 5 additions and 1 deletions

View File

@ -1249,7 +1249,10 @@ void GeometryManager::device_update_preprocess(Device *device, Scene *scene, Pro
}
}
if (geom->need_update_rebuild && geom->type == Geometry::VOLUME) {
/* Re-create volume mesh if we will rebuild or refit the BVH. Note we
* should only do it in that case, otherwise the BVH and mesh can go
* out of sync. */
if (geom->need_update && geom->type == Geometry::VOLUME) {
/* Create volume meshes if there is voxel data. */
if (!volume_images_updated) {
progress.set_status("Updating Meshes Volume Bounds");

View File

@ -583,6 +583,7 @@ void GeometryManager::create_volume_mesh(Volume *volume, Progress &progress)
volume->clear();
volume->reserve_mesh(vertices.size(), indices.size() / 3);
volume->used_shaders.push_back(volume_shader);
volume->need_update = true;
volume->need_update_rebuild = true;
for (size_t i = 0; i < vertices.size(); ++i) {