Skip to content

Commit

Permalink
[Impeller][Compute] Fix visual issues with heart (flutter#40240)
Browse files Browse the repository at this point in the history
  • Loading branch information
dnfield authored Mar 13, 2023
1 parent 650c6e3 commit 3d545ad
Show file tree
Hide file tree
Showing 4 changed files with 235 additions and 226 deletions.
2 changes: 1 addition & 1 deletion impeller/fixtures/cubic_to_quads.comp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void main() {

CubicData cubic = cubics.data[ident];

vec2 err_v = 3.0 * (cubic.cp2 - cubic.cp1) + cubic.p1 - cubic.p2;
vec2 err_v = (3.0 * cubic.cp2 - cubic.p2) - (3.0 * cubic.cp1 - cubic.p1);
float err = dot(err_v, err_v);
float quad_count = max(1., ceil(pow(err * (1.0 / max_hypot2), 1. / 6.0)));

Expand Down
Loading

0 comments on commit 3d545ad

Please sign in to comment.