-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
fix: set default blend mode filter's resolution to inherit #11584
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
base: dev
Are you sure you want to change the base?
fix: set default blend mode filter's resolution to inherit #11584
Conversation
Blend mode filter now inherit render target's resolution, instead default to 1. This will fix advanced blend mode like `overlay` when `devicePixelRatio` or the renderer’s resolution is not 1 or a power of two.
|
pixi.js-base • pixi.js-bunny-mark commit: |
|
I'm not sure using inherit as the default filter resolution is the best fix. The underlying problem seems like a mismatch between filter and renderer resolution, which we need to support. This fix is masking that problem. Also, would probably consider this a breaking change since it will increase memory usage unexpectedly for users. I'd, however, be open to reconsidering 1 as the default filter resolution in the next major version. |
…not power of two * move `inherit` settings to `BlendModeFilter.ts` (but commented)
|
Thanks for the feedback! As far as I know, if we're using But I understand your concern, and I comes up with 2 solution:
I would love to get your input on this. |
|
The context for why we chose 1 as the default resolution instead of the renderer resolution was more about performance. Filters generally hurt runtime performance in two ways: deoptimize batching and can use a lot of memory. For Pixi, we generally set defaults that are designed to perform the best sometimes at the expensive of fidelity. This was the reasons we chose resolution: 1. I'd like @GoodBoyDigital or @Zyie to weigh-in on this one. |
|
@privatestefans Thanks for your patience here. I had a chat with the team and this is what we decided:
|
|
Thanks for taking the time to discuss with the team. I think for this PR, I'll revert to my original proposal so it can be merged later or for future reference. Apologies for the delayed response 😅 |
Description of change
Blend mode filter now inherit render target's resolution, instead default to 1.
This will fix advanced blend mode like
overlay, color-burn, soft-lightwhendevicePixelRatioor the renderer’s resolution is not 1 or a power of two.Pre-Merge Checklist
npm run lint)npm run test)Related