diff --git a/manimlib/shaders/quadratic_bezier_stroke/frag.glsl b/manimlib/shaders/quadratic_bezier_stroke/frag.glsl index aae49883..9dc2f7e0 100644 --- a/manimlib/shaders/quadratic_bezier_stroke/frag.glsl +++ b/manimlib/shaders/quadratic_bezier_stroke/frag.glsl @@ -19,30 +19,6 @@ out vec4 frag_color; #INSERT quadratic_bezier_distance.glsl -float cross2d(vec2 v, vec2 w){ - return v.x * w.y - w.x * v.y; -} - -float modify_distance_for_endpoints(vec2 p, float dist, float t){ - if (0 <= t && t <= 1) return dist; - - float buff = 0.5 * uv_stroke_width - uv_anti_alias_width; - // Check the beginning of the curve - if(t < 0 && has_prev == 0) return max(dist, -p.x + buff); - - if(t > 1){ - // Check the end of the curve - vec2 v21 = vec2(1, 0) - uv_b2; - float len_v21 = length(v21); - if(len_v21 == 0) len_v21 = length(-uv_b2); - - float perp_dist = dot(p - uv_b2, v21) / len_v21; - if(has_next == 0) return max(dist, -perp_dist + buff); - } - return dist; -} - - float dist_to_curve(){ float dist = min_dist_to_curve(uv_coords, uv_b2, bezier_degree); if(has_prev == 0 && uv_coords.x < 0){