mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Tiny cleanup
This commit is contained in:
parent
2290f810ca
commit
fe7dc3c459
1 changed files with 4 additions and 3 deletions
|
@ -10,7 +10,9 @@ in float is_linear;
|
|||
|
||||
out vec4 frag_color;
|
||||
|
||||
float sdf(float x0, float y0){
|
||||
float sdf(){
|
||||
float x0 = uv_coords.x;
|
||||
float y0 = uv_coords.y;
|
||||
if(bool(is_linear)) return abs(y0);
|
||||
|
||||
float Fxy = y0 - x0 * x0;
|
||||
|
@ -24,6 +26,5 @@ void main() {
|
|||
if (color.a == 0) discard;
|
||||
frag_color = color;
|
||||
if (bool(fill_all)) return;
|
||||
float dist = sdf(uv_coords.x, uv_coords.y);
|
||||
frag_color.a *= smoothstep(1, 0, dist / uv_anti_alias_width);
|
||||
frag_color.a *= smoothstep(1, 0, sdf() / uv_anti_alias_width);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue