Skip to content
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

Sprites look blurry on retina display #3

Closed
msikma opened this issue Oct 13, 2014 · 4 comments
Closed

Sprites look blurry on retina display #3

msikma opened this issue Oct 13, 2014 · 4 comments

Comments

@msikma
Copy link
Owner

msikma commented Oct 13, 2014

Sprites look blurry due to the fact that they're upscaled on a retina display. Figure out if we can change the upscale to a point upscale rather than the browsers' standard bilinear/bicubic algorithm, and check whether we can get this to work correctly with global zoom values other than 200%.

@JosephTico
Copy link

Here's an interesting and very complete article about that.

http://html5hub.com/state-of-nearest-neighbor-interpolation-in-canvas/#i.3bx5iz87ues5sm

The thing is, there's still no proper cross-browser support for this method of upscaling and also it will have a performance impact.

@msikma
Copy link
Owner Author

msikma commented Jan 3, 2015

Thanks. This article seems to be a bit old, so with some luck things might have improved in Chrome.

It's unfortunate that IE doesn't have a valid method for doing this. However, using a modified image with doubled pixels might not be a bad thing (as long as it's loaded only when the pixel density is greater than 1.0) since it should not be that much larger than the non-upscaled version.

@JosephTico
Copy link

Well, now this can be implemented. This can be done by adding the following styles to .pkspr, and will work in most browsers.

  -ms-interpolation-mode: nearest-neighbor;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-crisp-edges;
  image-rendering: pixelated;

@msikma
Copy link
Owner Author

msikma commented Aug 3, 2015

This has been implemented. Thanks for pointing me to this code @Josephvb10. 👍

@msikma msikma closed this as completed Aug 3, 2015
JohnEstropia pushed a commit to JohnEstropia/pokesprite that referenced this issue Oct 24, 2020
cleanup appletun-gmax, genesect, marshadow, and minior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants