Include zero in orientation checks

This commit is contained in:
Grant Sanderson
2022-12-28 11:17:45 -08:00
parent b96a65d576
commit 4d65ceabf7
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ float sdf(){
// Sign takes care of whether we should be filling the inside or outside of curve.
float sgn = orientation * sign(v2);
float Fp = (p.x * p.x - p.y);
if(sgn * Fp < 0){
if(sgn * Fp <= 0){
return 0.0;
}else{
return min_dist_to_curve(uv_coords, uv_b2, bezier_degree);

View File

@ -78,7 +78,7 @@ void emit_pentagon(vec3[3] points, vec3 normal){
vec3 p0_perp = cross(t01, normal);
vec3 p2_perp = cross(t12, normal);
bool fill_inside = orientation > 0;
bool fill_inside = orientation >= 0.0;
float aaw = anti_alias_width;
vec3 corners[5];
if(fill_inside){