openspades icon indicating copy to clipboard operation
openspades copied to clipboard

Temporal Antialiasing

Open yvt opened this issue 8 years ago • 2 comments

yvt avatar Mar 05 '17 09:03 yvt

The current implementation only takes the camera rotation into account while reprojection. Because of this, the result was unsatisfactory without a combined use of temporal AA and FXAA and showed the necessity for a better reprojection algorithm.

Temporal AA + FXAA: shot0403

FXAA only: shot0404

Side-by-side comparison: openspades 0 2 0 temporal aa wip jun 2017

A slight color shift can be observed and seems to be caused by an inaccuracy of RGB-YUV conversion matrix.

Edges look really smooth as long as the scene stays static (r_scale is lowered to 0.7 so my PC can handle it) shot0408

yvt avatar Jun 25 '17 14:06 yvt

Temporal AA has been back-ported to master and made available through a hidden config variable named r_temporalAA. The following problems are present in the current implementation:

  • [x] The film grain effect is applied before temporal AA, which is very wrong.
    • Addressed in ae12df59ccfd59bd8c107e82a9774a5426f50a07.
  • [x] Camera translation is not taken into account during the reprojection pass. This results in very noticeable ghosting effects.
    • Addressed in 99f3f79e7f254e8eaf793337e39db38c83b1fdb4.
  • [ ] Object velocity is not taken into account during the reprojection pass. The artifacts are somewhat noticeable when you are following a player in a third-person view. Mobile objects lose antialiasing from time to time, but this is mitigated by FXAA in the current implementation.

yvt avatar Jan 17 '21 02:01 yvt