Can pixelArt be applied only to a scene instead of all game?

Hello,

I am working on a game using Phaser 3 with scale mode Phaser.Scale.FIT, which scretches the whole game full screen. This causes the antialising to stretch a lot of the textures. For most, it’s ok (like the fonts and images), but for some specific tiles to give a retro look, it simply doesn’t work with all the smoothing.

I can set “pixelArt: true”, but then it’s the opposite: fonts look bad, buttons, etc. As my game has different scenes for different display (Hud on a scene, Screen another), I can’t seem to specify on a scene level that I want pixelArt enable only for it.

Any suggestions?

Thanks.

You can turn antialiasing on or off per texture. But the game canvas itself is one or the other.

So maybe try turning off pixelArt and then do

tiles.texture.setFilterMode(Phaser.ScaleModes.NEAREST);

I have a similar issue where I want pixel art for 99% of my game, but I need a logo to be full resolution. Is there a way to change the default filter mode for all textures and images to be NEAREST, so that I only have to setFilterMode on the logo to turn off pixel art?

{ antialias: false } would be very similar to that.

Other than that, no, you would have to set the filter mode for each texture.