I wanted to implement a proper anti-aliasing method for Mithra. There are different sources of aliasing. For instance, we have the classic jagged edges of triangles and other things such as specular aliasing , which must be addressed, especially in a PBR setup.

Anyway, I decided to implement UE4’s TAA method, which was introduced by Brian Karis at SIGGRAPH 2014.

God Rays

When we implement TAA, we can see that the output converges in a couple of frames, and the edges would mostly look smooth and close to a super-sampled image. However, another valuable property of temporal techniques is that we can use them to achieve certain effects without spending a lot of the budget on them. In order to try this, I decided to implement God Rays in Mithra. The result is shown in the header of this post. I used a very low number of steps for ray-marching. As you can see, the output looked very noisy when TAA was turned off.

Noisy god rays with TAA off

However, when TAA is on, the accumulated result would look much better at such a low cost.

Smooth god rays with TAA on

Blue Noise

I should mention that when I was using a standard random number generator, I could see some patterns, and TAA was not as effective as it could be. So I took inspiration from this awesome blog and used blue noise and the golden ratio to hide the visible patterns.

Blue noise texture
Blue Noise