Jump to content

Issues rendering images on high DPI devices


andyish
 Share

Recommended Posts

I've been having some issues assets looking aliased (i think thats the right term) with mobile devices, specifically an s6 and s6 edge which admittedly has a DPI of nearly 600
(devicePixelRatio of 4).

I have a scene that i'm scaling so the height of it fits to the height of the screen and so to do this on devices like an s6 i'm scaling it down by about x0.25 which i guess is because the device returns a width and height of 640x360.

I've tried using texturePacker and exporting different sizes of assets then adjusting the resolution of the renderer but has no effect. I'm not sure if its because the images that i'm using are too big, however I thought that you are meant to use higher res images on devices with a higher DPI.

I've included a couple of screenshots off a device below, i'll try and answer any questions if there are any.
 

desktop.png

mobile.png

Link to comment
Share on other sites

Nice. Can you please test my library for loading these assets? https://github.com/pixijs/pixi-compressed-textures

You have to select "native" resolution, and make @2x @4x or @0.5x @0.25x of it. All game logic must work like you are using "native" resolution

Look at "atlasOptions" thing, it allows to select which atlas will be loaded.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...