Aliasing is a side effect that happens when a digital sampler samples real-world information and attempts to digitize it. For example, when you sample audio or video, aliasing means that the shape of the digital signal doesn’t match the shape of the original signal. This means when Unity renders a line, it may appear jagged as the pixelsThe smallest unit in a computer image. Pixel size depends on your screen resolution. Pixel lighting is calculated at every screen pixel. More info
See in Glossary don’t align perfectly with the line’s intended path across the screen.
An example of the rasterization process creating aliasing.
To prevent aliasing, the Universal Render PipelineA series of operations that take the contents of a Scene, and displays them on a screen. Unity lets you choose from pre-built render pipelines, or write your own. More info
See in Glossary (URP) has multiple methods of anti-aliasing, each with their own effectiveness and resource intensity.
The anti-aliasing methods available are:
FXAA uses a full screen pass that smooths edges on a per-pixel level. This is the least resource intensive anti-aliasing technique in URP.
To select FXAA for a CameraA component which creates an image of a particular viewpoint in your scene. The output is either drawn to the screen or captured as a texture. More info
See in Glossary:
Note: For anti-aliasing on mobile platforms, Unity recommends that you use FXAA.
SMAA finds patterns in the borders of an image and blends the pixels on these borders according to the pattern it finds. This anti-aliasing method has much sharper results than FXAA.
To select SMAA for a Camera:
TAA uses frames from a color history buffer to smooth edges over the course of multiple frames. Because TAA calculates its effects over time, it often creates ghosting artifacts in extreme situations, such as when a GameObjectThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary moves quickly in front of a surface that contrasts with it. TAA uses motion vectors.
To select TAA for a Camera:
The following features cannot be used with TAA:
MSAA samples the depth and stencil values of every pixel and combines these samples to produce the final pixel. Crucially, MSAA solves spatial aliasing issues and is better at solving triangle-edge aliasing issues than the other techniques. However, it does not fix shaderA program that runs on the GPU. More info
See in Glossary aliasing issues such as specular or texture aliasing.
MSAA is more resource intensive than other forms of anti-aliasing on most hardware. However, when run on a tiled GPU with no post-processingA process that improves product visuals by applying filters and effects before the image appears on screen. You can use post-processing effects to simulate physical camera and film properties, for example Bloom and Depth of Field. More info post processing, postprocessing, postprocess
See in Glossary anti-aliasing or custom render features in use, MSAA is a cheaper option than other anti-aliasing types.
MSAA is a hardware anti-aliasing method. This means you can use it with the other methods, as they are post-processing effects. However, you can’t use MSAA with TAA.
To enable MSAA:
For more information on the available settings, refer to the MSAA setings in the URP Asset.
Note: On mobile platforms that don’t support the StoreAndResolve store action, if Opaque Texture is selected in the URP Asset, Unity ignores the MSAA property at runtime (as if MSAA is set to Disabled).