Skip to content

fix: propagate drop shadow blur resolution - #528

Open
avsavani wants to merge 1 commit into
pixijs:mainfrom
avsavani:bounty-327-resolution-local
Open

fix: propagate drop shadow blur resolution#528
avsavani wants to merge 1 commit into
pixijs:mainfrom
avsavani:bounty-327-resolution-local

Conversation

@avsavani

Copy link
Copy Markdown

Summary

  • add resolution support to KawaseBlurFilter
  • pass DropShadowFilter's resolution and pixelSize through to its internal Kawase blur pass
  • keep blur/drop-shadow padding in sync when kernels or pixel size change at runtime

Why

DropShadowFilter already exposes a resolution option and defaults it to 1, but the internal KawaseBlurFilter was constructed without that value. On HiDPI/Retina renderers the blur pass can therefore do unnecessary DPR-scaled work, which is especially expensive for high-quality shadows.

This keeps the fix small and centralized: KawaseBlurFilter now owns its resolution option and pixel-size-aware padding, while DropShadowFilter reuses the inner blur's actual padding instead of duplicating an approximate formula.

Validation

  • npm run types
  • npm run lint
  • npm run build

Fixes #327

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DropShadowFilter low performance on Macs and iPhones

2 participants