Repository navigation
Fix Kawase blur offsets on WebGPU - #531
Open
snowyukitty wants to merge 1 commit into
Open
snowyukitty wants to merge 1 commit into
snowyukitty wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
KawaseBlurFilter changes the same
uOffsetuniform for every pass. WebGPU queues those draws against one buffer, so earlier passes also use the final, smallest offset. This explains the narrower, uneven blur reported in #500 and #475.Snapshot the offset with PixiJS's existing uniform batch for each WebGPU pass, including single-pass reuse at different input sizes. Restore the original uniform resource after the draw, including on error. This follows the approach used by the core blur filter in pixijs/pixijs#11909; kernels, shaders and WebGL behavior stay the same.
Adds regression checks to the existing screenshot workflow: per-pass snapshots and resource restoration run even without a WebGPU adapter, and rendered pixels are compared with a chain of independent single-pass filters. The checks cover qualities 1-4, clamping, anisotropic pixels and repeated frames, with a nonempty-image control. Failures propagate to the screenshot process exit code.
Validation:
npm run buildxvfb-run -a npm run dist(Electron 28; WebGL fallback in this environment)The regression fails on the audited base both at the missing snapshot and at the quality-2 pixel comparison. Each WebGPU pass now consumes one additional 128-byte slot in PixiJS's existing finite uniform batch.
The resolution/downsampling work in #517, #525 and #528 is adjacent; this change only addresses per-pass uniform lifetime.