mirror of
https://github.com/3b1b/manim.git
synced 2025-07-30 13:34:19 +08:00
Small cleanup
This commit is contained in:
@ -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;
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user