Repository navigation
perf: reduce neutral screen-effect filter work - #2
Merged
bbbreaddd merged 4 commits intoNov 16, 2026
Merged
Conversation
AbdullahTrees
force-pushed
the
perf/elide-identity-filters
branch
from
October 21, 2026 20:58
c48c5a3 to
d5e5f2c
Compare
Contributor
Author
|
@bbbreaddd any reason this isn't getting merged? This is actually a huge source of lag for unoptimized games. Care has been taken to ensure filters with non-zero effects are not ignored. |
Owner
|
Sorry, I meant to respond but forgot to. |
bbbreaddd
marked this pull request as draft
October 24, 2026 06:14
AbdullahTrees
force-pushed
the
perf/elide-identity-filters
branch
from
November 5, 2026 20:54
d5e5f2c to
9e7c620
Compare
Effect plugins commonly attach filters once and leave them on a container at zero strength so an animation can ramp them up later. When the same container also carries a custom fragment filter, PMJS builds one custom-filter plan from the whole chain and runs every pass, although the idle filters return their input unchanged: a zero BlurFilter alone is two directions times quality 4, eight full-frame passes. Leave identity filters out of both the custom plan and the fallback group chain: zero blur on both axes, ZoomBlur with zero strength, and AdvancedBloom with bloomScale 0 and brightness 1. The plan is rebuilt from the live filter array every frame, so a filter that starts ramping up is included again on the next frame. Example: OMORI's Aries001_AnimationScreenEffects keeps such filters on every spriteset for the whole game. On an RG40XX-H (Mali-G31, muOS) one map went from 11.7 to 29.4 fps and native draw from 45 to 2.7 ms; the 12-pass plan disappears. The all-filters-off ceiling is 29.7 fps / 2.1 ms.
AbdullahTrees
force-pushed
the
perf/elide-identity-filters
branch
from
November 5, 2026 20:54
9e7c620 to
fa19ce2
Compare
bbbreaddd
marked this pull request as ready for review
November 16, 2026 00:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Neutral screen-effect filters can leave unnecessary rendering work on every frame.
This combines native-path identity checks for blur, zoom blur and bloom with shader-qualified pass reduction for Gaussian blur. Authored shader chains retain their filters and apply hooks. Gaussian pass collapsing is limited to recognized shaders in full-viewport, resolution-one plans with an identity projection. It preserves the filter boundary, clipping, blending and scratch writes needed later in the chain; other authored plans retain their original passes. No shader variants or additional shader-program slots are used. Existing OMORI patches are unchanged.
Validation: