Delete unused functions

This commit is contained in:
Grant Sanderson
2023-01-09 00:07:46 -05:00
parent 08c02b21aa
commit 5870274adb

View File

@ -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){