From 083de38e4c46276f53ebc08256fe0432188a4054 Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Wed, 28 Dec 2022 10:05:44 -0800 Subject: [PATCH] Remove "arbitrary-seeming branching" --- manimlib/shaders/quadratic_bezier_fill/frag.glsl | 7 ------- 1 file changed, 7 deletions(-) diff --git a/manimlib/shaders/quadratic_bezier_fill/frag.glsl b/manimlib/shaders/quadratic_bezier_fill/frag.glsl index 3e9433b2..9e00af84 100644 --- a/manimlib/shaders/quadratic_bezier_fill/frag.glsl +++ b/manimlib/shaders/quadratic_bezier_fill/frag.glsl @@ -32,13 +32,6 @@ float sdf(){ if(abs(v2 / u2) < 0.1 * uv_anti_alias_width){ return abs(uv_coords[1]); } - // For flat-ish curves, take the curve - else if(abs(v2 / u2) < 0.5 * uv_anti_alias_width){ - return min_dist_to_curve(uv_coords, uv_b2, bezier_degree); - } - // I know, I don't love this amount of arbitrary-seeming branching either, - // but a number of strange dimples and bugs pop up otherwise. - // This converts uv_coords to yet another space where the bezier points sit on // (0, 0), (1/2, 0) and (1, 1), so that the curve can be expressed implicityly // as y = x^2.