forked from bartvdbraak/blender
Fix T82027, T81718: Cycles crash with volume animation playback
This commit is contained in:
parent
8b836f6894
commit
8b806c86e1
@ -1129,7 +1129,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");
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user