[Bf-blender-cvs] [75d035d] cycles_bvh: Cycles BVH: Simplify some evaluation in regular BVH traversal
Sergey Sharybin
noreply at git.blender.org
Wed Jul 6 12:50:11 CEST 2016
Commit: 75d035d0c14a0f0db4e7ce68e12c206141b96008
Author: Sergey Sharybin
Date: Wed Jul 6 12:23:44 2016 +0200
Branches: cycles_bvh
https://developer.blender.org/rB75d035d0c14a0f0db4e7ce68e12c206141b96008
Cycles BVH: Simplify some evaluation in regular BVH traversal
Addressing review from Brecht.
===================================================================
M intern/cycles/kernel/geom/geom_bvh_nodes.h
===================================================================
diff --git a/intern/cycles/kernel/geom/geom_bvh_nodes.h b/intern/cycles/kernel/geom/geom_bvh_nodes.h
index db13d6b..98bd25d 100644
--- a/intern/cycles/kernel/geom/geom_bvh_nodes.h
+++ b/intern/cycles/kernel/geom/geom_bvh_nodes.h
@@ -149,11 +149,8 @@ ccl_device_inline bool bvh_unaligned_node_intersect_child(
Transform space = bvh_unaligned_node_fetch_space(kg, nodeAddr, child);
float3 aligned_dir = transform_direction(&space, dir);
float3 aligned_P = transform_point(&space, P);
- float3 nrdir = -1.0f * bvh_inverse_direction(aligned_dir);
- /* TODO(sergey): Do we need here as well? */
- float3 tLowerXYZ = make_float3(aligned_P.x * nrdir.x,
- aligned_P.y * nrdir.y,
- aligned_P.z * nrdir.z);
+ float3 nrdir = - bvh_inverse_direction(aligned_dir);
+ float3 tLowerXYZ = aligned_P * nrdir
float3 tUpperXYZ = tLowerXYZ - nrdir;
const float tNearX = min(tLowerXYZ.x, tUpperXYZ.x);
const float tNearY = min(tLowerXYZ.y, tUpperXYZ.y);
More information about the Bf-blender-cvs
mailing list