From e03b7176877d27f4dd42dd698a85a1f046f9202a Mon Sep 17 00:00:00 2001 From: mano-wii Date: Mon, 17 Jun 2019 09:16:13 -0300 Subject: Fix T65620: Sculpting brush size jumping. The PBVHs raycast function calls `isect_ray_tri_epsilon_v3` with epsilon `0.1` which is inaccurate and may result in the problem presented in T65620. The solution is to use `isect_ray_tri_watertight_v3` instead `isect_ray_tri_epsilon_v3`. This can positively affect other areas as well. Reviewers: brecht, campbellbarton Differential Revision: https://developer.blender.org/D5083 --- source/blender/blenkernel/intern/pbvh_intern.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/blenkernel/intern/pbvh_intern.h') diff --git a/source/blender/blenkernel/intern/pbvh_intern.h b/source/blender/blenkernel/intern/pbvh_intern.h index 74d7312e6a7..dc9d796075b 100644 --- a/source/blender/blenkernel/intern/pbvh_intern.h +++ b/source/blender/blenkernel/intern/pbvh_intern.h @@ -174,14 +174,14 @@ void BBC_update_centroid(BBC *bbc); int BB_widest_axis(const BB *bb); void pbvh_grow_nodes(PBVH *bvh, int totnode); bool ray_face_intersection_quad(const float ray_start[3], - const float ray_normal[3], + struct IsectRayPrecalc *isect_precalc, const float *t0, const float *t1, const float *t2, const float *t3, float *depth); bool ray_face_intersection_tri(const float ray_start[3], - const float ray_normal[3], + struct IsectRayPrecalc *isect_precalc, const float *t0, const float *t1, const float *t2, @@ -208,7 +208,7 @@ void pbvh_update_BB_redraw(PBVH *bvh, PBVHNode **nodes, int totnode, int flag); /* pbvh_bmesh.c */ bool pbvh_bmesh_node_raycast(PBVHNode *node, const float ray_start[3], - const float ray_normal[3], + struct IsectRayPrecalc *isect_precalc, float *dist, bool use_original); bool pbvh_bmesh_node_nearest_to_ray(PBVHNode *node, -- cgit v1.2.3