phaserjs / phaser

Phaser is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.
https://phaser.io
MIT License
37.19k stars 7.1k forks source link

PreFX ColorMatrix cuts off image based on camera #6923

Open iscrooble opened 1 month ago

iscrooble commented 1 month ago

Version

Description

Assigning preFX.addColorMatrix(); to an image cuts it off based on the camera's dimensions and zoom level, leaving a portion of the image at the very center. You don't even have to change the ColorMatrix properties for this to happen. Changing it to postFX fixes the issue.

Example in sandbox.

samme commented 1 month ago

https://phaser.io/sandbox/ygXinikQ