[Bf-blender-cvs] [f27d87d] master: Cycles: Replace magic constant in the code with actual node size

Sergey Sharybin noreply at git.blender.org
Wed Dec 24 22:56:16 CET 2014


Commit: f27d87d30043c2bb09bee461ce903744e074de8b
Author: Sergey Sharybin
Date:   Sun Dec 21 22:14:58 2014 +0500
Branches: master
https://developer.blender.org/rBf27d87d30043c2bb09bee461ce903744e074de8b

Cycles: Replace magic constant in the code with actual node size

===================================================================

M	intern/cycles/bvh/bvh.cpp

===================================================================

diff --git a/intern/cycles/bvh/bvh.cpp b/intern/cycles/bvh/bvh.cpp
index 84b8540..1bddff3 100644
--- a/intern/cycles/bvh/bvh.cpp
+++ b/intern/cycles/bvh/bvh.cpp
@@ -636,7 +636,7 @@ void RegularBVH::refit_nodes()
 
 void RegularBVH::refit_node(int idx, bool leaf, BoundBox& bbox, uint& visibility)
 {
-	int4 *data = &pack.nodes[idx*4];
+	int4 *data = &pack.nodes[idx*BVH_NODE_SIZE];
 
 	int c0 = data[3].x;
 	int c1 = data[3].y;




More information about the Bf-blender-cvs mailing list