question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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 device-pixel-ratio-off-text viewer.resolutionScale = window.devicePixelRatio; device-pixel-ratio-on-text

viewer.scene.postProcessStages.fxaa.enabled = false; other

viewer.resolutionScale = window.devicePixelRatio; viewer.scene.postProcessStages.fxaa.enabled = false; device-pixel-ratio-on-fxaa-on-text

viewer.resolutionScale = window.devicePixelRatio; viewer.scene.postProcessStages.fxaa.enabled = false; SDF 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:closed
  • Created 4 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
mramatocommented, Aug 12, 2019

To recap the above discussion, the change we all agreed with here is:

  • Disable FXAA by default
  • default viewer.resolutionScale = window.devicePixelRatio;
  • Multiply default maximum SSE by devicePixelRatio for both both 3D Tiles and imagery. This is to not increase the number of tiles requested for browsers that request a lower resolution rendering
1reaction
lilleysecommented, May 29, 2019

That sounds good to me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reconsider image scaling and fxaa · Issue #7875 - GitHub
FXAA seems like something we should just disable by default. It's more likely that someone will get turned off by blurry text than...
Read more >
Getting Started with NVIDIA Image Scaling
Support a high-quality anti-aliasing technique like TAA or FXAA. Ability to negatively bias the LOD for textures and geometry.
Read more >
NVIDIA extends Temporal Antialiasing with adaptive ray tracing
It extends temporal antialiasing of rasterized images with adaptive ray tracing, and conforms to the constraints of a commercial game engine ...
Read more >
Untitled
The image of Alibi is flanked by two ghostly silhouettes, ... to 100 percent render scaling for the ultra preset, and FXAA for...
Read more >
(H)ybrid high-(Q)uality (A)nti-(A)liasing (HQAA) - ReShade
HQAA is a merging of FXAA, SMAA, and CAS balanced and configured to provide high visual quality anti-aliasing effect in cases where Temporal...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found