Background:
- On making a page to work with some high-resolution screens, we found that the gpu memory is too easy to run out, the setHardwareScalingLevel can reduce the use of gpu memory by making the scene really blur.
- AMD FidelityFX Super Resolution (FSR) is a spatial upscaling technology that allows games to be rendered at a lower resolution and then upscaled to a higher resolution without a significant loss in image quality.
Existing work:
- The homepage of FSR
- The FidelityFX-FSR github repo
- A blog article about fsr
- shader codes on shadertoy:
- https://github.com/Hajime-san/web-fsr based on three.js
-
https://github.com/BenjaminWegener/AMD-fidelityFX-SuperResolution-webGL based on
glea.js
Possible ways:
- Render the scene to a RenderTargetTexture, with a lower resolution than the canvas, maybe 1/2 ~ 1/4
- Use FSR shader to upscale the RenderTargetTexture and render the upscaled result to canvas, instead of rendering the scene to canvas.
Questions:
- Is what described above possible is babylon.js?
- Are events affected? For example mouse or touch inputs, ray picking, and GUI.
- Can Post Processes work with this? Or can this be a part of Post Processes?
- Is this possible with both WebGL and WebGPU engine?
- Can gpu memory footage reduced with this?
- Would fps reduce or increase if gpu memory is the bottleneck?
- How many draw calls would this use in addition to rendering the original scene?
- Are there anything else affected by this?
Possible alternatives: