-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Conversation
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.
# Conflicts: # CHANGES.md
# Conflicts: # CHANGES.md
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. |
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. |
# Conflicts: # CHANGES.md
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. |
Not sure when my Mac will be fixed. @klim705 let's test this on your machine tomorrow. |
Yeap, looks good! Sorry for the delay. |
See CesiumGS/cesium#3288 for details.
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