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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-09-01 19:53:36 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-09-01 19:53:36 +0400
commitdf625253ac0dec5be70701e2694c1e0358343fbf (patch)
tree10b216af9eb607023a3b280b8641acf336e34b10 /intern/cycles/bvh/bvh_build.cpp
parent1e741b3a52cc44b7a3ee173f180fd3d99c958efc (diff)
Cycles:
* Add max diffuse/glossy/transmission bounces * Add separate min/max for transparent depth * Updated/added some presets that use these options * Add ray visibility options for objects, to hide them from camera/diffuse/glossy/transmission/shadow rays * Is singular ray output for light path node Details here: http://wiki.blender.org/index.php/Dev:2.5/Source/Render/Cycles/LightPaths
Diffstat (limited to 'intern/cycles/bvh/bvh_build.cpp')
-rw-r--r--intern/cycles/bvh/bvh_build.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/intern/cycles/bvh/bvh_build.cpp b/intern/cycles/bvh/bvh_build.cpp
index 3e47cb75014..d3e84e11d53 100644
--- a/intern/cycles/bvh/bvh_build.cpp
+++ b/intern/cycles/bvh/bvh_build.cpp
@@ -218,12 +218,13 @@ BVHNode *BVHBuild::create_object_leaf_nodes(const Reference *ref, int num)
{
if(num == 0) {
BoundBox bounds;
- return new LeafNode(bounds, 0, 0);
+ return new LeafNode(bounds, 0, 0, 0);
}
else if(num == 1) {
prim_index.push_back(ref[0].prim_index);
prim_object.push_back(ref[0].prim_object);
- return new LeafNode(ref[0].bounds, prim_index.size()-1, prim_index.size());
+ uint visibility = objects[ref[0].prim_object]->visibility;
+ return new LeafNode(ref[0].bounds, visibility, prim_index.size()-1, prim_index.size());
}
else {
int mid = num/2;
@@ -244,12 +245,14 @@ BVHNode* BVHBuild::create_leaf_node(const NodeSpec& spec)
vector<int>& p_object = prim_object;
BoundBox bounds;
int num = 0;
+ uint visibility = 0;
for(int i = 0; i < spec.num; i++) {
if(references.back().prim_index != -1) {
p_index.push_back(references.back().prim_index);
p_object.push_back(references.back().prim_object);
bounds.grow(references.back().bounds);
+ visibility |= objects[references.back().prim_object]->visibility;
references.pop_back();
num++;
}
@@ -258,7 +261,7 @@ BVHNode* BVHBuild::create_leaf_node(const NodeSpec& spec)
BVHNode *leaf = NULL;
if(num > 0) {
- leaf = new LeafNode(bounds, p_index.size() - num, p_index.size());
+ leaf = new LeafNode(bounds, visibility, p_index.size() - num, p_index.size());
if(num == spec.num)
return leaf;