-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Pixels on bottom edge of RenderTexture are inconsistent when using BlurFilterPass in Pixi5 #5969
Comments
I worked with v5 blur a lot. Yes, there can be differences on edge. This exact difference happens because v5 applies padding BEFORE fit to source, and v4 applies it AFTER. v4: https://github.com/pixijs/pixi.js/blob/v4.x/src/core/renderers/webgl/managers/FilterManager.js#L147 You can switch off autoFit ( // required
filter.autoFit = false;
container.filters = [filter];
//optional
container.filterArea = container.getBounds();
//now somehow we need source frame size... like, your renderTexture frame?
container.filterArea.fit(rt.frame);
//or screen frame?
container.filterArea.fit(renderer.screen);
//padding will be applied automatically by filterSystem, like before |
Thanks for the quick response! I think we'll be able to use this to fix the problem we're having. |
Seems addressed, closing. |
Yeah , we can add compatibility mode later, i added a mention to wiki. |
Expected Behavior
Pixels in generated texture should be consistent with source object
Current Behavior
Pixels at bottom edge of generated texture are not consistent
Steps to Reproduce
Pixi5 example (not working) - https://www.pixiplayground.com/#/edit/4kgn~bpbYpQMU17cVu5Xl
Pixi4 example (working) - https://www.pixiplayground.com/#/edit/fH6RLPM_wFUd_~piDZF7s
Both of these samples have near-identical code (with only pixi4 -> pixi5 differences).
Sorry for the vague issue title, but I'm not actually sure what's happening. When comparing the pixi4 and pixi5 samples above, the pixi4 sample works correctly, while the pixi5 sample has a red blur at the bottom of the texture. It could be a sampling issue since it only occurs at the edge of the texture, but that's just a guess.
Note: The actual blur is different between Pixi4's BlurYFilter and Pixi5's BlurFilterPass, but that's not part of the issue.
The text was updated successfully, but these errors were encountered: