Commit: f6b162eca03f2eb19b32c52327be924d7ac96471 Author: Hans Goudey Date: Sun Sep 5 12:17:52 2021 -0500 Branches: geometry-nodes-level-set-nodes https://developer.blender.org/rBf6b162eca03f2eb19b32c52327be924d7ac96471
Fix incorrect values used to construct Ray =================================================================== M source/blender/nodes/geometry/nodes/node_geo_raycast.cc =================================================================== diff --git a/source/blender/nodes/geometry/nodes/node_geo_raycast.cc b/source/blender/nodes/geometry/nodes/node_geo_raycast.cc index dafe4fbbcff..281d7564c22 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_raycast.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_raycast.cc @@ -97,7 +97,11 @@ static void raycast_to_level_set(const openvdb::FloatGrid &level_set, for (const int i : ray_origins.index_range()) { const openvdb::math::Vec3s origin(ray_origins[i].x, ray_origins[i].y, ray_origins[i].z); const openvdb::math::Vec3s dir(ray_directions[i].x, ray_directions[i].y, ray_directions[i].z); - const openvdb::math::Ray<double> ray(origin, dir, 0.0, ray_lengths[i]); + const openvdb::math::Ray<double> ray( + origin, + dir.unitSafe(), + std::numeric_limits<double>::epsilon(), + std::max(std::numeric_limits<float>::epsilon(), ray_lengths[i])); openvdb::math::Vec3d hit_position(0); openvdb::math::Vec3d hit_normal(0); _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs