mirror of
https://github.com/3b1b/manim.git
synced 2025-09-19 04:41:56 +00:00
Tiny cleanup
This commit is contained in:
parent
4b652be492
commit
70113d5a48
1 changed files with 2 additions and 3 deletions
|
@ -53,9 +53,8 @@ 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;
|
||||
float signed_dist = abs(dist_to_curve(x0, y0)) - 0.5 * uv_stroke_width;
|
||||
float dist = dist_to_curve(uv_coords.x, uv_coords.y);
|
||||
float signed_dist = abs(dist) - 0.5 * uv_stroke_width;
|
||||
|
||||
frag_color = color;
|
||||
frag_color.a *= smoothstep(0.5, -0.5, signed_dist / uv_anti_alias_width);
|
||||
|
|
Loading…
Add table
Reference in a new issue