Small cleanup

This commit is contained in:
Grant Sanderson
2023-01-09 19:54:21 -08:00
parent b4544052d9
commit 480cc6759f
2 changed files with 1 additions and 9 deletions

View File

@ -14,12 +14,6 @@ out vec4 frag_color;
const float QUICK_DIST_WIDTH = 0.2;
float cube_root(float x){
return sign(x) * pow(abs(x), 1.0 / 3.0);
}
// Distance from (x0, y0) to the curve y = x^2
float dist_to_curve(float x0, float y0){
if(bezier_degree == 1.0){
@ -59,9 +53,9 @@ float dist_to_curve(float x0, float y0){
void main() {
if (uv_stroke_width == 0) discard;
// Compute sdf for the region around the curve we wish to color.
float x0 = uv_coords.x;
float y0 = uv_coords.y;
// An sdf for the region around the curve we wish to color.
float signed_dist = abs(dist_to_curve(x0, y0)) - 0.5 * uv_stroke_width;
frag_color = color;

View File

@ -31,8 +31,6 @@ out vec4 color;
out float uv_stroke_width;
out float uv_anti_alias_width;
// out float has_prev;
// out float has_next;
out float bezier_degree;
out vec2 uv_coords;