-
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
SSE Independent from Resolution Density & Cesium Renders at Screen Res #8083
Conversation
Thanks for the pull request @ProjectBarks!
Reviewers, don't forget to make sure that:
|
https://www.diffchecker.com/qUyoflwq Here are the sandcastles I used to test: |
I think I've convinced myself that all of these changes are good and will produce the behavior we desire. The only gotcha here is that If I wanted to render Cesium at full resolution, with full tiles. I would essentially have to add code so that |
Yeah I'm on the fence about the option. But it's really easy to add and might be useful to some people, even if most won't touch it. It could be worth adding back. And I like your summary
which could inform both the name and description of that variable. |
The only property I would consider adding is something similar to:
but the whole SSE to css pixel seems like a logical progression.
|
@lilleyse I'm okay with punting on the option for this PR and adding it later if needed. Feel free to merge if you are otherwise happy with this PR. I'd like it in master at least a week before we ship. |
I'm seeing some test failures locally on Linux:
Many |
@mramato this looks good to me. Can you check out the changes to |
@lilleyse that was my suggested placement of the fix, so I'm good with them. We really need to clean-up and revisit our jasmine config (since we have two of them right now) could be a nice sprint issue. I'm doing a little light testing now and will merge assuming no surprises. |
Thanks again @ProjectBarks! Everything working as advertised. |
@mramato the change in this PR prevents the tests from running in IE11:
The issue is that |
IE11 can't really run the WebGL tests anyway, so in practice it might not matter. However, since the spec says devicePixelRatio is read-only, feel free to revert the change and write up a separate issue to ensure our tests all pass on non-1 devicePixelRatio machines. |
Just a heads up for anyone that wanted to revert this behaviour.
Would we consider some alternative changes inside of Cesium to avoid having to do this? I'm happy to help.
|
We struggled with this as well. This was our solution, which seems ok so far: Using native resolution sounds good in theory, but we saw terrible performance on e.g. Macs with 4K displays and lame GPUs. |
@kring @DanielLeone you can now replace any workaround code with |
Please see: #8082
Changes
Scene
andFrameState
that is used to either upscale or downscale SSE values. I took the approach of dividing the SSE value by the constant opposed to scaling up the max sse value.Viewer
- There used to be a_forceResize
attribute in Viewer that was used to make the canvas resize when the window size changed. However, this was only called when theresolutionScale
function was called which calls the theresolutionScale
function of thecesiumWidget
. BasicallyresolutionScale
is a proxy to a class that already has a force update function and so that logic should be handled solely in the class it proxies the call.