On shader changes, make sure these are uploaded in the cases where an expensive object rebuild isn't required #6
@ -435,7 +435,8 @@ void GeometryManager::device_update_preprocess(Device *device, Scene *scene, Pro
|
|||||||
/* Re-create volume mesh if we will rebuild or refit the BVH. Note we
|
/* 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
|
* should only do it in that case, otherwise the BVH and mesh can go
|
||||||
* out of sync. */
|
* out of sync. */
|
||||||
if (geom->is_modified() && geom->geometry_type == Geometry::VOLUME) {
|
if (geom->is_volume()) {
|
||||||
|
if (geom->need_update_rebuild) {
|
||||||
/* Create volume meshes if there is voxel data. */
|
/* Create volume meshes if there is voxel data. */
|
||||||
if (!volume_images_updated) {
|
if (!volume_images_updated) {
|
||||||
progress.set_status("Updating Meshes Volume Bounds");
|
progress.set_status("Updating Meshes Volume Bounds");
|
||||||
@ -449,6 +450,10 @@ void GeometryManager::device_update_preprocess(Device *device, Scene *scene, Pro
|
|||||||
/* always reallocate when we have a volume, as we need to rebuild the BVH */
|
/* always reallocate when we have a volume, as we need to rebuild the BVH */
|
||||||
device_update_flags |= DEVICE_MESH_DATA_NEEDS_REALLOC;
|
device_update_flags |= DEVICE_MESH_DATA_NEEDS_REALLOC;
|
||||||
}
|
}
|
||||||
|
else if (geom->is_modified()) {
|
||||||
|
device_update_flags |= DEVICE_MESH_DATA_MODIFIED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (geom->is_hair()) {
|
if (geom->is_hair()) {
|
||||||
/* Set curve shape, still a global scene setting for now. */
|
/* Set curve shape, still a global scene setting for now. */
|
||||||
|
@ -265,4 +265,13 @@ openvdb::GridBase::ConstPtr VDBImageLoader::get_grid()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
int VDBImageLoader::get_precision() const
|
||||||
|
{
|
||||||
|
#ifdef WITH_NANOVDB
|
||||||
|
return precision;
|
||||||
|
#else
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
CCL_NAMESPACE_END
|
CCL_NAMESPACE_END
|
||||||
|
@ -40,6 +40,8 @@ class VDBImageLoader : public ImageLoader {
|
|||||||
|
|
||||||
virtual bool is_vdb_loader() const override;
|
virtual bool is_vdb_loader() const override;
|
||||||
|
|
||||||
|
int get_precision() const;
|
||||||
|
|
||||||
#ifdef WITH_OPENVDB
|
#ifdef WITH_OPENVDB
|
||||||
openvdb::GridBase::ConstPtr get_grid();
|
openvdb::GridBase::ConstPtr get_grid();
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user