diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-01-10 01:41:04 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-01-12 12:49:56 +0300 |
commit | b56f5900dc776c45d83c99334473d1cb3874feaf (patch) | |
tree | 5fdcf4ea44b3953463bd9f2f2eb95cee9e77d3fa /intern/cycles/bvh/bvh_build.h | |
parent | d8fc404415ded274f75b754437597543705cf0ec (diff) |
Cycles: BVH params option to split leaf node by primitive types
The idea of this change is make it possible to split leaf nodes by primitive
type, making leaf containing primitives of the same type.
This would become handy when working on a single ray to multiple triangles
intersection code, plus with careful implementation it might give some extra
benefits on BVH traversal code by avoiding primitive type fetch and check for
each primitive in the node. But that's a bit tricky to have benefits on this
change only because depth of BVH increases.
This option is not exposed to the interface at all and not used even secretly,
the commit is only needed to help working further in this direction without
messing around with local patches and worrying of them running out of date.
Diffstat (limited to 'intern/cycles/bvh/bvh_build.h')
-rw-r--r-- | intern/cycles/bvh/bvh_build.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/intern/cycles/bvh/bvh_build.h b/intern/cycles/bvh/bvh_build.h index a6b9916de9b..75c64be6eab 100644 --- a/intern/cycles/bvh/bvh_build.h +++ b/intern/cycles/bvh/bvh_build.h @@ -70,6 +70,15 @@ protected: BVHNode *create_leaf_node(const BVHRange& range); BVHNode *create_object_leaf_nodes(const BVHReference *ref, int start, int num); + /* Leaf node type splitting. */ + BVHNode *create_leaf_node_split(const BVHRange& range); + BVHNode *create_primitive_leaf_node(const vector<int>& p_type, + const vector<int>& p_index, + const vector<int>& p_object, + const BoundBox& bounds, + uint visibility, + int start); + bool range_within_max_leaf_size(const BVHRange& range); /* threads */ @@ -116,4 +125,3 @@ protected: CCL_NAMESPACE_END #endif /* __BVH_BUILD_H__ */ - |