Skip to content
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

Blend issues with impeller #34

Closed
esDotDev opened this issue Sep 21, 2022 · 6 comments
Closed

Blend issues with impeller #34

esDotDev opened this issue Sep 21, 2022 · 6 comments

Comments

@esDotDev
Copy link
Contributor

esDotDev commented Sep 21, 2022

Using the latest master, with code like:

Image(
  image: ...,
  color: Colors.black,
  colorBlendMode: BlendMode.color,
  opacity: AlwaysStoppedAnimation(0.2),
),

We are seeing blending issues:
image

Without impeller:
image

@zanderso
Copy link

cc @bdero

@bdero
Copy link

bdero commented Sep 21, 2022

This looks like the alpha channel is either getting dropped or ignored somewhere along the line for these images. Trying to reproduce this.

@bdero
Copy link

bdero commented Sep 21, 2022

I believe the issue is the way I did the alpha compositing for advanced blends in the case where a foreground color is specified. In this case, the source color is being overridden to opaque black, so the fragment alpha output is always 1: https://github.com/flutter/engine/blob/main/impeller/entity/shaders/blending/advanced_blend.glsl#L43

I'm currently working out the correct behavior for this.

@bdero
Copy link

bdero commented Sep 22, 2022

Fix: flutter/engine#36338.

BTW, that overhang shadow isn't missing in Impeller, right? I assume it fades in when starting to scroll down.

@esDotDev
Copy link
Contributor Author

Correct, the shadow is good w/ impeller, its just not visible in that screenshot.

@esDotDev
Copy link
Contributor Author

Fixed in 2e0d6f100c9ea77d2b31b04752fa4e185b1a05cf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants