mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
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  ## After  Using the app from https://github.com/flutter/flutter/issues/145481 but with the scaling factor increased to 10.0.