-
Notifications
You must be signed in to change notification settings - Fork 78
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
Add support for setting blending mode #337
Conversation
Neat, this would fix #227 |
Hi @djeedai , Please help me review this PR, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi- Thanks for the PR! I'm OK in principle I think but there's a few things I'm not convinced about:
- we do a lot of duplication here, see other comments.
- this probably doesn't justify the overhead of maintaining a full separate example just for this, and especially adding new assets (which are shipped with the crate and increase its size, even if just for examples)
104e5f0
to
256b83e
Compare
@Soulghost would you mind please merge latest |
Co-authored-by: Sludge <[email protected]>
256b83e
to
de74719
Compare
Hi @djeedai , I have rebased my feature branch based on the latest main branch, please review my code again, thank you very much. |
Hi @djeedai , it appears that the failure of |
@Soulghost don't mind those. There's no auto-merge, I make the call on whether to merge. In that case coverage drop is minimal so all fine, and the failing examples is a bug upstream we can't do anything about for now. So all good. I'll have a final look later and merge. |
Got it, thank you very much. |
This commit adds a
with_blending_mode
, which can be used to set the blending mode for the particle renderer. In addition to alpha blend mode, premultiply and additive mode has been added.The additive blending mode is useful for glow effects, the picture below makes a comparison.
Additive Blending
Alpha Blending
Sample Code
Add this image to the
assets/orange_circle.png