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

Honor devicePixelRatio take 3 #3288

Merged
merged 4 commits into from
Jan 19, 2016
Merged

Honor devicePixelRatio take 3 #3288

merged 4 commits into from
Jan 19, 2016

Conversation

mramato
Copy link
Contributor

@mramato mramato commented Dec 4, 2015

This reintroduces #3233, but now uses the image-rendering CSS property to disable smooth scaling and avoid blurriness. Since this is a CSS4 property, it's not yet supported by all browsers (Safari/IE), so we detect if the property is supported and if it isn't, we fallback to full resolution rendering on those browsers so that the image is always crisp (at the cost of performance).

The other nice thing about this approach is that it's detect capability and not the browser itself, so when Safari and IE do add support, Cesium will automatically start taking advantage of it.

Given the previous false start, I'm in no rush to merge this, but I'm fairly confident that this is the right fix and tested out this branch on a variety of devices.

Fixes #3249

This reintroduces #3233, but now uses the `image-rendering` CSS property
to disable smooth scaling and avoid burriness. Since this is a CSS4
property, it's not yet supported by all browsers (Safari/IE), so we detect
if the property is supported and if it isn't, we fallback to full
resolution rendering on those browsers so that the image is always crisp.

The other nice thing about this approach is that it's detect capability
and not the browser itself, so when Safari and IE do add support, Cesium
will automatically start taking advantage of it.
@pjcozzi
Copy link
Contributor

pjcozzi commented Dec 22, 2015

I most likely will not be able to look at this until after the 1.17 release. WebGL has been crashing my Mac. I think the fan failed, but need to look into it.

@mramato
Copy link
Contributor Author

mramato commented Dec 22, 2015

No problem. As long as we can get it merged in early Jan so it has time to sit in master in case before 1.18.

@mramato
Copy link
Contributor Author

mramato commented Jan 18, 2016

I'd like to get this into 1.18. The better frame rate on android should also be a big plus for the new cardboard webvr support.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jan 18, 2016

Not sure when my Mac will be fixed. @klim705 let's test this on your machine tomorrow.

@klim705
Copy link
Contributor

klim705 commented Jan 19, 2016

It looks alright on my Mac.
model-after

@pjcozzi
Copy link
Contributor

pjcozzi commented Jan 19, 2016

Yeap, looks good! Sorry for the delay.

pjcozzi added a commit that referenced this pull request Jan 19, 2016
@pjcozzi pjcozzi merged commit 5e00cc0 into master Jan 19, 2016
@pjcozzi pjcozzi deleted the dpi-take-3 branch January 19, 2016 13:00
gberaudo added a commit to gberaudo/ol3-cesium that referenced this pull request Mar 31, 2016
@pjcozzi pjcozzi mentioned this pull request Sep 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cesium looks aliased on MacBook Pro Retina display
3 participants