Quantcast
Channel: Pixi.js Latest Topics
Viewing all articles
Browse latest Browse all 3978

PIXI game looks blurry on mobile devices

$
0
0

I can't get Pixi game look crispy on mobile devices. Whenever window.devicePixelRatio is greater than 1, no matter what I do game doesn't look as crispy as it looks when window.devicePixelRatio equals to 1. Images for mobile version are saved separately (downscaled using photoshop). Using roundPixels = true on my sprites.

 

devicePixelRatio:1
 

1003804907_ScreenShot2021-12-25at12_25_39PM.png.d273890dd620b2d10ef976cc3b680f86.png

devicePixelRatio:3

591329934_2021-12-2512_16_27.thumb.jpg.64c60c23dd23bbf20b60d57dcd2025b4.jpg

 

Any help would be much appreciated.

Here is how I am setting up my stage:
 

if (window.devicePixelRatio){
    RESOLUTION = window.devicePixelRatio;
}
PIXI.GRAPHICS_CURVES.adaptive = false;
PIXI.settings.autoDensity = true;
PIXI.settings.ANISOTROPIC_LEVEL = 0;
PIXI.settings.RESOLUTION = window.devicePixelRatio;
let app = new PIXI.Application({
    width:window.innerWidth/RESOLUTION,
    height: window.innerHeight/RESOLUTION,
    antialias: true,
    autoResize: true,
    resize: (window.innerWidth/RESOLUTION, window.innerHeight/RESOLUTION),
    transparent: false,
    resolution: window.devicePixelRatio,
    rootRenderTarget: {
        resolution: window.devicePixelRatio
    },
    backgroundColor: secondColor,
});


 

Viewing all articles
Browse latest Browse all 3978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>