Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-08-22 22:19:00 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-08-24 10:46:40 +0300
commit334208e67086530924c1172d4c993ae14508c0cf (patch)
tree43877b87e7b3bf835b9b3e70ad7971e96f5fa428 /intern/cycles/bvh/bvh_split.h
parentc88c5db3601b82f347f2f54f49fae8ae173ff03b (diff)
Cycles: Implementation of object reference nodes spatial split
This commit implements object reference node spatial split making it possible to use spatial split for top-level BVH. The code is not in use yet because enabling spatial split on top level BVH is not coming for free and it needs to be investigated if it's worth in terms of improved render times.
Diffstat (limited to 'intern/cycles/bvh/bvh_split.h')
-rw-r--r--intern/cycles/bvh/bvh_split.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/intern/cycles/bvh/bvh_split.h b/intern/cycles/bvh/bvh_split.h
index f9bed5f69e9..1e46bb66203 100644
--- a/intern/cycles/bvh/bvh_split.h
+++ b/intern/cycles/bvh/bvh_split.h
@@ -63,13 +63,21 @@ public:
float pos);
protected:
+ /* Lower-level functions which calculates boundaries of left and right nodes
+ * needed for spatial split.
+ *
+ * Operates directly with primitive specified by it's index, reused by higher
+ * level splitting functions.
+ */
void split_triangle_primitive(const Mesh *mesh,
+ const Transform *tfm,
int prim_index,
int dim,
float pos,
BoundBox& left_bounds,
BoundBox& right_bounds);
void split_curve_primitive(const Mesh *mesh,
+ const Transform *tfm,
int prim_index,
int segment_index,
int dim,
@@ -77,6 +85,11 @@ protected:
BoundBox& left_bounds,
BoundBox& right_bounds);
+ /* Lower-level functions which calculates boundaries of left and right nodes
+ * needed for spatial split.
+ *
+ * Operates with BVHReference, internally uses lower level API functions.
+ */
void split_triangle_reference(const BVHReference& ref,
const Mesh *mesh,
int dim,
@@ -89,6 +102,11 @@ protected:
float pos,
BoundBox& left_bounds,
BoundBox& right_bounds);
+ void split_object_reference(const Object *object,
+ int dim,
+ float pos,
+ BoundBox& left_bounds,
+ BoundBox& right_bounds);
};
/* Mixed Object-Spatial Split */