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 ailising , which must be addressed, especially in a PBR setup.
Anyways, I decided to implement UE4’s TAA method, which was introduced by Brian Karis a couple of years ago.
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.
However, when TAA is on, the accumulated result would look much better at such a low cost.
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 golden ratio to hide the visible patterns.