-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[Impeller] Transparent paths overdraw #101330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
c: rendering
UI glitches reported at the engine/skia or impeller rendering level
e: impeller
Impeller rendering backend issues and features requests
engine
flutter/engine repository. See also e: labels.
Comments
The stencil approach sounds great to me. |
bdero
added a commit
to bdero/impeller
that referenced
this issue
Apr 7, 2022
This was referenced Apr 7, 2022
bdero
added a commit
to bdero/impeller
that referenced
this issue
Apr 7, 2022
bdero
added a commit
to bdero/impeller
that referenced
this issue
Apr 7, 2022
bdero
added a commit
to flutter/impeller
that referenced
this issue
Apr 7, 2022
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
dnfield
pushed a commit
to dnfield/engine
that referenced
this issue
Apr 26, 2022
dnfield
pushed a commit
to flutter/engine
that referenced
this issue
Apr 27, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
c: rendering
UI glitches reported at the engine/skia or impeller rendering level
e: impeller
Impeller rendering backend issues and features requests
engine
flutter/engine repository. See also e: labels.
Right now, we don't write to a depth or stencil buffer for draw calls that render solid strokes/fills, and overlapping triangles in the same draw call just draw on top of each other.
Here's the equivalent Skia Fiddle for reference:

https://fiddle.skia.org/c/027392122bec8ac2b5d5de00a4b9bbe2
Since we're already using the stencil check for the clip stack, one solution would be to use shallow depth attachments per render target, increment the geometry depth slightly with each draw call, draw with
MTLCompareFunction.greater
, and clear the depth buffer whenever we have enough solid strokes/fills drawn to the target such that we need to loop around.@chinmaygarde Does the above seem like a reasonable approach to you? We could also trade the increased device memory for solutions with more draw calls (like increment the stencil buffer and discard fragments that don't match the current stencil height, then draw a clip restore at the previous max height), but I suspect we're doing pretty good in the device memory department right now.
The text was updated successfully, but these errors were encountered: