diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-01-16 17:13:37 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-01-16 17:13:37 +0400 |
commit | 92764260d7050800572c9d5b8a80f954572e9a0f (patch) | |
tree | fe2f6821b5dd93e0cb49cc2ae1f78c4e04235df6 /intern/cycles/bvh/bvh_params.h | |
parent | 3123ad12a395031a1bf5a964582762a3831e9b1c (diff) |
Cycles: add option to cache BVH's between subsequent renders, storing the BVH on
disk to be reused by the next render.
This is useful for rendering animations where only the camera or materials change.
Note that saving the BVH to disk only to be removed for the next frame is slower
if this is not the case and the meshes do actually change.
For a render, it will save bvh files to the cache user directory, and remove all
cache files from other renders. The files are named using a MD5 hash based on the
mesh, to verify if the meshes are still the same.
Diffstat (limited to 'intern/cycles/bvh/bvh_params.h')
-rw-r--r-- | intern/cycles/bvh/bvh_params.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/intern/cycles/bvh/bvh_params.h b/intern/cycles/bvh/bvh_params.h index b38e40cfbda..38093438500 100644 --- a/intern/cycles/bvh/bvh_params.h +++ b/intern/cycles/bvh/bvh_params.h @@ -26,7 +26,7 @@ class BVHParams { public: /* spatial split area threshold */ - bool use_spatial_split; + int use_spatial_split; float spatial_split_alpha; /* SAH costs */ @@ -38,13 +38,15 @@ public: int max_leaf_size; /* object or mesh level bvh */ - bool top_level; + int top_level; /* disk cache */ - bool use_cache; + int use_cache; /* QBVH */ - bool use_qbvh; + int use_qbvh; + + int pad; /* fixed parameters */ enum { @@ -67,6 +69,7 @@ public: top_level = false; use_cache = false; use_qbvh = false; + pad = false; } /* SAH costs */ |