Skip to content

[4.0.0-rc.1] Lights misplaced when filters are enabled on camera with modified viewport position #7100

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

Closed
bagyoni opened this issue Apr 4, 2025 · 1 comment

Comments

@bagyoni
Copy link
Contributor

bagyoni commented Apr 4, 2025

Version

  • Phaser Version: 4.0.0-rc.1
  • Operating system: Linux

Description

Adding any filter to cameras.main seems to cause the viewport translation to be applied twice to every light in the scene.

Example Test Code

https://phaser.io/sandbox/EKRXy9Uj

EDIT: Not sure if related, but adding a filter to a sprite makes the light disappear from it even if the sprite, the light and the viewport are all positioned at (0, 0): https://phaser.io/sandbox/2P4fSxAW

@BenjaminDRichards
Copy link
Collaborator

Thanks for bringing this to our attention! I've dug through the lighting code, and found some assumptions about coordinates. With those fixed, it appears that both these issues are resolved. The changes should be in Release Candidate 4.

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

No branches or pull requests

2 participants