для этой страницы,
отображается код на другом
Temporal anti-aliasing (also known as TAA) is a anti-aliasing technique to reduce temporal aliasing (flickering or shimmering effects).
ISS without TAA.
ISS with TAA.
Unlike Multisample anti-aliasing (MSAA) that performs anti-aliasing only on edges of polygons (and makes this edges smoother), Temporal anti-aliasing applies smoothing to the whole scene. In case of full deferred rendering (when the final image is composed of different texture buffers: depth, normal, etc.), MSAA will increase performance costs, because Multisample anti-aliasing should be applied to each texture buffer.
How TAA works
The main concept of temporal anti-aliasing is to use a sub pixel jitter of scene camera every frame and then combine all this frames into the final image. So, it will take time to get a smoothed picture (for example, 5-7 frames), but with the frequency of 60 frames per second it will look seamlessly.
During rasterization process, there is a test whether the object will get into pixel or not. And the object will not be rendered if it doesn't occupy a major part of a pixel.
And here we can get an error, when we have a sphere object before rasterization and get a square object after, because some parts of the sphere doesn't occupy enough pixel space.
Not a very good rendering, right? And temporal anti-aliasing solves this problem, because camera will have a sub pixel jitter, and each part of this sphere at least once will be rendered in a frame. And after combining these frames, we will get a true sphere, not a square! Voila!
This anti-aliasing technique works perfectly for static scenes (without any moving objects). But when objects are moving, frames will significantly differ one from another and we will see a trail of "ghosts" of the moving object. This effect is called ghosting.
To get rid of ghosting, there is a velocity buffer. Velocity buffer stores information about transformations of objects. Due to this buffer, the engine knows about the object transformation and don't render the "ghosts" of the moving object. Also, the engine checks the color intensity of the pixel, because of camera jitter.
TAA has a wide scope of usage, because it improves whole image (not only the edges of the geometry, like MSAA) including geometry, shadows, etc. But the main factor of good TAA working is optimized content on the scene: the higher FPS is, the faster temporal anti-aliasing smooths the scene. In addition to this, UNIGINE 2.0 allows you to choose the type of anti-aliasing: TAA or FXAA.