Support for TAA (Temporal Anti-Aliasing)

This version of AA remains to give the smoothest result (especially when moving) by far in my opinion, so I was wondering, is this a Post-process effect that we can add?

Three.js has it’s own implementation here: three.js webgl - postprocessing manual taa and ssaa.
It also has been talked about before on the HTML5gamedevs forum: Subpixel rendering? - Questions & Answers - HTML5 Game Devs Forum where someone was able to implement it with BabylonJS in a commercial product.

What I can see from the Three.js example is that it uses features from SSAA, and I’ve read it’s pretty much one of the more complicated AA techniques out there. So I’m wondering, has this been thought of before but that it’s not something easy to add?

I actually pinged @Kesshi to see if he wanted to contribute his solution to the framework :slight_smile:

Hi,

i don’t think our solution will work here. What we are doing is a more simple approach. I would call it “progressive enhancement using multi sampling”. We only enable it if the user is not intracting with the scene to improve the quality of the “static” image. As soon as the user starts the interaction again we disable it and fallback to hardware anti aliasing. If we would enabled it while the user is moving an object for example we would see very strong ghosting (like motion blur).

Our solution works like this:

  • between render frames we modify the camera projection matrix to create a subpixel camera jitter
  • using post processing we store the current render frame and combine it later with the next camera frame
  • we combine up to 32 frames
1 Like

By the way we are doing the same thing to create high quality soft shadows which have very less hardware requirements (mobile support)
You just have to move the shadow light between camera frames.

2 Likes

Ah I see, thanks for the explanation.

In my case I’d prefer to use an AA solution that works even while moving the camera, just like the three.js sample.

Does one of you have any idea how difficult it would be to port it over to BabylonJS? The most tricky part I think would be to use the SSAA features inside the custom TAA pass.