mirror of
https://github.com/3b1b/manim.git
synced 2025-08-01 06:22:54 +08:00
Include zero in orientation checks
This commit is contained in:
@ -43,7 +43,7 @@ float sdf(){
|
|||||||
// Sign takes care of whether we should be filling the inside or outside of curve.
|
// Sign takes care of whether we should be filling the inside or outside of curve.
|
||||||
float sgn = orientation * sign(v2);
|
float sgn = orientation * sign(v2);
|
||||||
float Fp = (p.x * p.x - p.y);
|
float Fp = (p.x * p.x - p.y);
|
||||||
if(sgn * Fp < 0){
|
if(sgn * Fp <= 0){
|
||||||
return 0.0;
|
return 0.0;
|
||||||
}else{
|
}else{
|
||||||
return min_dist_to_curve(uv_coords, uv_b2, bezier_degree);
|
return min_dist_to_curve(uv_coords, uv_b2, bezier_degree);
|
||||||
|
@ -78,7 +78,7 @@ void emit_pentagon(vec3[3] points, vec3 normal){
|
|||||||
vec3 p0_perp = cross(t01, normal);
|
vec3 p0_perp = cross(t01, normal);
|
||||||
vec3 p2_perp = cross(t12, normal);
|
vec3 p2_perp = cross(t12, normal);
|
||||||
|
|
||||||
bool fill_inside = orientation > 0;
|
bool fill_inside = orientation >= 0.0;
|
||||||
float aaw = anti_alias_width;
|
float aaw = anti_alias_width;
|
||||||
vec3 corners[5];
|
vec3 corners[5];
|
||||||
if(fill_inside){
|
if(fill_inside){
|
||||||
|
Reference in New Issue
Block a user