Reconsider image scaling and fxaa
See original GitHub issue@pjcozzi and I were talking about SDF fonts and how Cesium’s default rendering may be hurting image quality more than SDF can help. If our goal is crisp rendering we may want to disable image scaling and FXAA. I created some screenshots to show how image quality can improve by disabling these features. They were captured on a 4K monitor with 1.3x display scaling. Make sure to view them in full resolution.
default
viewer.resolutionScale = window.devicePixelRatio;
viewer.scene.postProcessStages.fxaa.enabled = false;
viewer.resolutionScale = window.devicePixelRatio;
viewer.scene.postProcessStages.fxaa.enabled = false;
viewer.resolutionScale = window.devicePixelRatio;
viewer.scene.postProcessStages.fxaa.enabled = false;
SDF
If we disable image scaling there will be a performance hit in both the number of shaded pixels and number of tiles requested. I haven’t ran performance tests yet. In the 3D Tiles Inspector sandcastle I saw a difference of 316 vs. 453 tiles visited. One compromise might be to disable image scaling for rendering but still account for it when computing screen space error. Another compromise might be to use image scaling on mobile devices but not laptops/desktops if that’s knowable.
FXAA seems like something we should just disable by default. It’s more likely that someone will get turned off by blurry text than pixelated edges.
Then there’s a hybrid solution which is to render the scene as normal with image scaling and fxaa but render billboards to a higher resolution target without anti-aliasing. https://github.com/AnalyticalGraphicsInc/cesium/issues/4235 goes into more details about that.
Mainly I’m just looking for discussion and whether these are changes we’d be comfortable making.
Also see https://github.com/AnalyticalGraphicsInc/cesium/issues/7682
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (10 by maintainers)
Top GitHub Comments
To recap the above discussion, the change we all agreed with here is:
That sounds good to me.