From 5d6a1f30c40b8381bd2e835a9f687c86cd163e40 Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Fri, 23 Aug 2024 13:55:10 -0500 Subject: [PATCH] Count joints near 180 degrees as straight --- manimlib/shaders/quadratic_bezier/stroke/geom.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manimlib/shaders/quadratic_bezier/stroke/geom.glsl b/manimlib/shaders/quadratic_bezier/stroke/geom.glsl index 1f901eea..a3e66e06 100644 --- a/manimlib/shaders/quadratic_bezier/stroke/geom.glsl +++ b/manimlib/shaders/quadratic_bezier/stroke/geom.glsl @@ -91,7 +91,7 @@ vec3 step_to_corner(vec3 point, vec3 tangent, vec3 unit_normal, float joint_angl float cos_angle = cos(joint_angle); float sin_angle = sin(joint_angle); - if (cos_angle > COS_THRESHOLD) return step; + if (abs(cos_angle) > COS_THRESHOLD) return step; // Below here, figure out the adjustment to bevel or miter a joint if (flat_stroke == 0){