mateversum icon indicating copy to clipboard operation
mateversum copied to clipboard

Anti aliasing

Open expenses opened this issue 3 years ago • 1 comments

Related to https://github.com/expenses/mateversum/issues/28.

I was trying out VR with a headset connected to a poertful gpu and noticed that the flickering from aliasing was quite bad. The regular, hardware based approach to anti aliasing is to use multisampled anti aliasing. Unfortunately we can only multisample (in WebGL) if:

  • we're rendering objects directly to the device framebuffer
  • OR if we're the Oculus webgl multisampling extension: https://developer.oculus.com/documentation/web/web-multiview/#using-multiview-in-webgl-20 (only implemented in the Oculus browser).

This unfortunately leaves out GPUs that are rendering to a HDR framebuffer for things like bloom. A solution here might be to use a shader-based anti aliasing method like fxaa (or txaa?)

Additionally it's worth mentioning that resolving a multisampled hdr framebuffer has some requirements to allow for better edges. See https://mynameismjp.wordpress.com/2012/10/24/msaa-overview/. Also discussed for bevy: https://github.com/bevyengine/bevy/pull/3425.

expenses avatar Jun 17 '22 11:06 expenses

Godot TAA implementation: https://github.com/godotengine/godot/commit/5ebdfc31b290e8bf42c387ad7b2f65c4c45c7853

expenses avatar Jun 18 '22 22:06 expenses