Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Antialiasing comparison table, remove redundant MSAA limitations section #10167

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion tutorials/3d/3d_antialiasing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ StandardMaterial3D or ORMMaterial3D properties. Alpha to coverage has a
moderate performance cost, but it's effective at reducing aliasing on
transparent materials without introducing any blurriness.

To make specular aliasing less noticeable, use the `Screen-space roughness limiter`_,
which is enabled by default.

MSAA can be enabled in the Project Settings by changing the value of the
**Rendering > Anti Aliasing > Quality > MSAA 3D** setting. It's important to change
the value of the **MSAA 3D** setting and not **MSAA 2D**, as these are entirely
Expand Down Expand Up @@ -231,7 +234,9 @@ an effect on roughness map rendering itself, its impact is limited there.

The screen-space roughness limiter is enabled by default; it doesn't require
any manual setup. It has a small performance impact, so consider disabling it
if your project isn't affected by specular aliasing much.
if your project isn't affected by specular aliasing much. You can disable it
with the **Rendering > Quality > Screen Space Filters > Screen Space Roughness Limiter**
project setting.

Texture roughness limiter on import
-----------------------------------
Expand Down Expand Up @@ -279,3 +284,37 @@ usually unnecessary, but it can provide better visuals on high-end GPUs or for
:ref:`non-real-time rendering <doc_creating_movies>`. For example, to make
moving edges look better when TAA is enabled, you can also enable MSAA at the
same time.

Antialiasing comparison
~~~~~~~~~~~~~~~~~~~~~~~

+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+
| Feature | MSAA | TAA | FSR2 | FXAA | SSAA | SSRL |
+==========================+==========================+==========================+==========================+==========================+==========================+==========================+
| Edge antialiasing | 🟢 Yes | 🟢 Yes | 🟢 Yes | 🟢 Yes | 🟢 Yes | 🔴 No |
+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+
| Specular antialiasing | 🟡 Some | 🟢 Yes | 🟢 Yes | 🟡 Some | 🟢 Yes | 🟢 Yes |
+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+
| Transparency antialiasing| 🟡 Some [1]_ | 🟢 Yes [2]_ | 🟢 Yes [2]_ | 🟢 Yes | 🟢 Yes | 🔴 No |
| | | | | | | |
+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+
| Added blur | 🟢 None | 🟡 Some | 🟡 Some | 🟡 Some | 🟡 Some [3]_ | 🟢 None |
| | | | | | | |
+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+
| Ghosting artifacts | 🟢 None | 🔴 Yes | 🔴 Yes | 🟢 None | 🟢 None | 🟢 None |
+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+
| Performance cost | 🟡 Medium | 🟡 Medium | 🔴 High | 🟢 Low | 🔴 Very High | 🟡 Medium |
+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+
| Forward+ | ✔️ Yes | ✔️ Yes | ✔️ Yes | ✔️ Yes | ✔️ Yes | ✔️ Yes |
+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+
| Mobile | ✔️ Yes | ❌ No | ❌ No | ✔️ Yes | ✔️ Yes | ✔️ Yes |
+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+
| Compatibility | ✔️ Yes | ❌ No | ❌ No | ❌ No | ✔️ Yes | ❌ No |
+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+--------------------------+


.. [1] MSAA does not work well with materials with Alpha Scissor (1-bit transparency).
This can be mitigated by enabling ``alpha antialiasing`` on the material.
.. [2] TAA/FSR2 transparency antialiasing is most effective when using Alpha Scissor.
.. [3] SSAA has some blur from bilinear downscaling. This can be mitigated by
using an integer scaling factor of ``2.0``.
41 changes: 0 additions & 41 deletions tutorials/3d/3d_rendering_limitations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,44 +150,3 @@ this feature. There are still several ways to avoid this problem:
:alt: Transparency sorting comparison (alpha-blended materials on the left, alpha scissor materials on the right)

Transparency sorting comparison (alpha-blended materials on the left, alpha scissor materials on the right)

Multi-sample antialiasing
-------------------------

.. seealso::

Antialiasing is explained in detail on the :ref:`doc_3d_antialiasing` page.

Multi-sample antialiasing (MSAA) takes multiple *coverage* samples at the edges
of polygons when rendering objects. It does not increase the number of *color*
samples used to render a scene. Here's what this means in practice:

- Edges of meshes will be smoothed out nicely (as well as supersampling would).
- Transparent materials that use *alpha testing* (1-bit transparency) won't be smoothed out.
- Specular aliasing ("sparkles" that appear on reflective surfaces) won't be reduced.

There are several ways to work around this limitation depending on your performance budget:

- To make specular aliasing less noticeable, open the Project Settings and enable
**Rendering > Quality > Screen Space Filters > Screen Space Roughness Limiter**.
This filter has a moderate cost on performance, so it should only be enabled if
you actually need it.

- Enable fast approximate antialiasing (FXAA) in addition to (or instead of)
MSAA. Since FXAA is a screen-space antialiasing method, it will smooth out
anything. As a downside, FXAA also makes the scene appear blurrier, especially
at resolutions below 1440p. FXAA also lacks temporal information, which means
its impact on specular aliasing is limited.

- Enable temporal antialiasing (TAA) in addition to (or instead of) MSAA. Since
TAA is a screen-space antialiasing method, it will smooth out anything. As a
downside, TAA also makes the scene appear blurrier, especially at resolutions
below 1440p. TAA provides superior quality compared to FXAA and can
effectively combat specular aliasing. However, TAA has a greater performance
cost compared to FXAA, and TAA can introduce ghosting artifacts with fast
movement.

- Render the scene at a higher resolution by increasing the **Scaling 3D >
Scale** project setting above ``1.0``. This technique is called supersample
antialiasing (SSAA) and is very slow. Its use is generally only recommended
for offline rendering.