Adjust rendered DisplayObjects' dimensions with filters #2700
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is has been an old bug;
For example if you put one or more filters on a Flixel's FlxCamera (that for rendering Shaders, and so Filters, uses an OpenFL's Sprite) on certain screens you can easily notice that the camera gains +1 pixel on the right and bottom side (and so it's oblivious that this doesn't happen on FlxCameras only but on every OpenFL's Rendered DisplayObjects).
Me and @NeeEoo found an easy way to fix this on certain resolutions which comprehends a lot of screen sizes actually (still testing on FlxCameras), but we feel like there could be a more dynamic fix so this is going to stay a draft until we find out a better fix.
Here's an example of two overlapped cameras with the bottom one using filters (filters on that camera'a OpenFL Sprite) and the top one not using them but having a black sprite that uses the camera's dimensions (better visible on larger screens or zooming):
As you can see the bottom camera with filters has one more pixel on bottom and right side than the one without filters.
This disappears with this Pull Request's fix.