diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-06-10 11:14:05 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-07-07 18:25:48 +0300 |
commit | 1eacbf47e3cdf009b27972e1c617fb1ff56c0aad (patch) | |
tree | 07330ae832445574bd084e71afe4fdfcfc47fddf /intern/cycles/bvh/bvh.h | |
parent | a19da5c10d2edac01070760438ae9bb1d89f1439 (diff) |
Cycles: Support visibility check for inner nodes of QBVH
It was initially unsupported because initial idea of checking visibility
of all children was slowing scenes down a lot. Now the idea has changed
and we only perform visibility check of current node. This avoids huge
slowdown (from tests here it seems to be withing 1-2%, but more tests
would never hurt) and gives nice speedup of ray traversal for complex
scenes which utilized ray visibility.
Here's timing of koro.blend:
Without visibility check With visibility check
Original file 4min 20sec 4min 23sec
Camera rays only 1min 43 sec 55sec
Unfortunately, this doesn't come for free and requires extra data in
BVH node, which increases memory usage of BVH nodes by 15%. This we
can solve with some future trickery of avoiding __tri_storage created
for curve segments.
Diffstat (limited to 'intern/cycles/bvh/bvh.h')
-rw-r--r-- | intern/cycles/bvh/bvh.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/bvh/bvh.h b/intern/cycles/bvh/bvh.h index 6076c25ca31..b1655f0c5d0 100644 --- a/intern/cycles/bvh/bvh.h +++ b/intern/cycles/bvh/bvh.h @@ -35,7 +35,7 @@ class Progress; #define BVH_NODE_SIZE 4 #define BVH_NODE_LEAF_SIZE 1 -#define BVH_QNODE_SIZE 7 +#define BVH_QNODE_SIZE 8 #define BVH_QNODE_LEAF_SIZE 1 #define BVH_ALIGN 4096 #define TRI_NODE_SIZE 3 |