Jonah Williams 92abaefe25 [Impeller] use screen space coordinates for dithering. (flutter/engine#51668)
Currently we're using the canvas coordinate positions for dithering. This usually works, but if the gradient includes a transform, then we might end up with 1 canvas coordinate pt = multiple physical pixels. This can result dithering artifacts since larger blocks will get the same color weight.

instead we can use gl_FragCoord.xy to get the screenspace coordinates which aren't effect by this transform.

Fixes https://github.com/flutter/flutter/issues/145481

## Before

![flutter_04](https://github.com/flutter/engine/assets/8975114/5f5c19a5-575b-45fb-8f58-c5dc4e46dfb1)

## After

![flutter_05](https://github.com/flutter/engine/assets/8975114/8e80c967-a73d-433c-a16d-918f2aa042db)

Using the app from https://github.com/flutter/flutter/issues/145481 but with the scaling factor increased to 10.0.
2024-03-26 20:48:04 +00:00
Languages
Dart 75%
C++ 16.5%
Objective-C++ 2.9%
Java 2.8%
Objective-C 0.7%
Other 1.9%