diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2020-10-30 19:14:17 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2020-11-03 20:05:29 +0300 |
commit | 57d1aea64f0c54be499aea0ae0a28109e212f321 (patch) | |
tree | 1a8428f4a61d28be0c75aa88c44184602fd186ea /intern/cycles/bvh/bvh_optix.cpp | |
parent | 216880bb4733a98af8bb6525c237b71b9dff2062 (diff) |
Cycles: add support for BVH refit in OptiX
This avoids recomputing the BVH for geometries that do not have changes in topology but whose vertices are modified (like a simple character animation), and gives up to 40% speedup for BVH building.
This is only available for viewport renders at the moment.
Reviewed By: pmoursnv, brecht
Differential Revision: https://developer.blender.org/D9353
Diffstat (limited to 'intern/cycles/bvh/bvh_optix.cpp')
-rw-r--r-- | intern/cycles/bvh/bvh_optix.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/intern/cycles/bvh/bvh_optix.cpp b/intern/cycles/bvh/bvh_optix.cpp index 0527c0eeda8..f2666688123 100644 --- a/intern/cycles/bvh/bvh_optix.cpp +++ b/intern/cycles/bvh/bvh_optix.cpp @@ -37,6 +37,9 @@ BVHOptiX::BVHOptiX(const BVHParams ¶ms_, const vector<Object *> &objects_) : BVH(params_, geometry_, objects_) { + optix_handle = 0; + optix_data_handle = 0; + do_refit = false; } BVHOptiX::~BVHOptiX() @@ -216,8 +219,7 @@ void BVHOptiX::pack_nodes(const BVHNode *) void BVHOptiX::refit_nodes() { - // TODO(pmours): Implement? - VLOG(1) << "Refit is not yet implemented for OptiX BVH."; + do_refit = true; } BVHNode *BVHOptiX::widen_children_nodes(const BVHNode *) |