Browse Source

Merge pull request #8056 from Calinou/antialiasing-resolution-scaling-fsr2

Document AMD FidelityFX Super Resolution 2.2 support
Matthew 1 year ago
parent
commit
7925ccb0d1

+ 4 - 2
about/list_of_features.rst

@@ -362,6 +362,8 @@ Rendering
 **Anti-aliasing:**
 
 - Temporal :ref:`antialiasing <doc_3d_antialiasing>` (TAA).
+- AMD FidelityFX Super Resolution 2.2 :ref:`antialiasing <doc_3d_antialiasing>` (FSR2),
+  which can be used at native resolution as a form of high-quality temporal antialiasing.
 - Multi-sample antialiasing (MSAA), for both :ref:`doc_2d_antialiasing` and :ref:`doc_3d_antialiasing`.
 - Fast approximate antialiasing (FXAA).
 - Super-sample antialiasing (SSAA) using bilinear 3D scaling and a 3D resolution scale above 1.0.
@@ -372,8 +374,8 @@ Rendering
 - Support for :ref:`rendering 3D at a lower resolution <doc_resolution_scaling>`
   while keeping 2D rendering at the original scale. This can be used to improve
   performance on low-end systems or improve visuals on high-end systems.
-- Resolution scaling uses bilinear filtering or AMD FidelityFX Super Resolution
-  1.0 (FSR).
+- Resolution scaling uses bilinear filtering, AMD FidelityFX Super Resolution
+  1.0 (FSR1) or AMD FidelityFX Super Resolution 2.2 (FSR2).
 - Texture mipmap LOD bias is adjusted automatically to improve quality at lower
   resolution scales. It can also be modified with a manual offset.
 

+ 40 - 3
tutorials/3d/3d_antialiasing.rst

@@ -104,12 +104,45 @@ objects. Rendering at a higher framerate will allow TAA to converge faster,
 therefore making those ghosting artifacts less visible.
 
 Temporal antialiasing can be enabled in the Project Settings by changing the
-value of the **Rendering > Anti Aliasing > Quality > Use Taa** setting.
+value of the **Rendering > Anti Aliasing > Quality > Use TAA** setting.
 
 Comparison between no antialiasing (left) and TAA (right):
 
 .. image:: img/antialiasing_taa.webp
 
+.. _doc_3d_antialiasing_fsr2:
+
+AMD FidelityFX Super Resolution 2.2 (FSR2)
+------------------------------------------
+
+Since Godot 4.2, there is built-in support for
+`AMD FidelityFX Super Resolution <https://www.amd.com/en/technologies/fidelityfx-super-resolution>`__
+2.2. This is an :ref:`upscaling method <doc_resolution_scaling>`
+compatible with all recent GPUs from any vendor. FSR2 is normally designed to
+improve performance by lowering the internal 3D rendering resolution,
+then upscaling to the output resolution.
+
+However, unlike FSR1, FSR2 also provides temporal antialiasing. This means FSR2
+can be used at native resolution for high-quality antialiasing, with the input
+resolution being equal to the output resolution. In this situation, enabling
+FSR2 will actually *decrease* performance, but it will significantly improve
+rendering quality.
+
+Using FSR2 at native resolution is more demanding than using TAA at native
+resolution, so its use is only recommended if you have significant GPU headroom.
+On the bright side, FSR2 provides better antialiasing coverage with less
+blurriness compared to TAA, especially in motion.
+
+Comparison between no antialiasing (left) and FSR2 at native resolution (right):
+
+.. image:: img/antialiasing_fsr2_native.webp
+
+..  note::
+
+    By default, the **FSR Sharpness** project setting is set to ``0.2`` (higher
+    values result in less sharpening). For the purposes of comparison, FSR
+    sharpening has been disabled by setting it to ``2.0`` on the above screenshot.
+
 .. _doc_3d_antialiasing_fxaa:
 
 Fast approximate antialiasing (FXAA)
@@ -158,7 +191,9 @@ Supersample antialiasing is performed by increasing the **Rendering > Scaling 3D
 > Scale** advanced project setting above ``1.0`` while ensuring
 **Rendering > Scaling 3D > Mode** is set to **Bilinear** (the default).
 Since the scale factor is defined per-axis, a scale factor of ``1.5`` will result
-in 2.25× SSAA while a scale factor of ``2.0`` will result in 4× SSAA.
+in 2.25× SSAA while a scale factor of ``2.0`` will result in 4× SSAA. Since Godot
+uses the hardware's own bilinear filtering to perform the downsampling, the result
+will look crisper at integer scale factors (namely, ``2.0``).
 
 Comparison between no antialiasing (left) and various SSAA levels (right):
 
@@ -223,7 +258,9 @@ For projects with a photorealistic art direction, TAA is generally the most
 suitable option. While TAA can introduce ghosting artifacts, there is no other
 technique that combats specular aliasing as well as TAA does. The screen-space
 roughness limiter helps a little, but is far less effective against specular
-aliasing overall.
+aliasing overall. If you have spare GPU power, you can use FSR2 at native
+resolution for a better-looking form of temporal antialiasing compared to
+standard TAA.
 
 For projects with a low amount of reflective surfaces (such as a cartoon
 artstyle), MSAA can work well. MSAA is also a good option if avoiding blurriness

BIN
tutorials/3d/img/antialiasing_fsr2_native.webp


BIN
tutorials/3d/img/resolution_scaling_fsr2_0.5.webp


BIN
tutorials/3d/img/resolution_scaling_fsr2_msaa_4x_0.5.webp


+ 3 - 2
tutorials/3d/lights_and_shadows.rst

@@ -447,8 +447,9 @@ textures, as the texture detail will help make the dithering pattern less notice
 
 However, in projects with less detailed textures, the shadow dithering pattern
 may be more visible. To hide this pattern, you can either enable
-:ref:`doc_3d_antialiasing_taa`, :ref:`doc_3d_antialiasing_fxaa`, or increase the
-shadow filter quality to **Soft Medium** or higher.
+:ref:`doc_3d_antialiasing_taa`, :ref:`doc_3d_antialiasing_fsr2`,
+:ref:`doc_3d_antialiasing_fxaa`, or increase the shadow filter quality to
+**Soft Medium** or higher.
 
 The **Soft Very Low** setting will automatically decrease shadow blur to make
 artifacts from the low sample count less visible. Conversely, the **Soft High**

+ 31 - 8
tutorials/3d/resolution_scaling.rst

@@ -3,6 +3,9 @@
 Resolution scaling
 ==================
 
+.. Images on this page were generated using the project below:
+.. https://github.com/Calinou/godot-antialiasing-comparison
+
 Why use resolution scaling?
 ---------------------------
 
@@ -43,29 +46,44 @@ Scaling mode
 - **Bilinear:** Standard bilinear filtering (default).
 - **FSR 1.0:** `AMD FidelityFX Super Resolution 1.0 <https://gpuopen.com/fidelityfx-superresolution/>`__.
   Slower, but higher quality compared to bilinear scaling. On very slow GPUs,
-  the cost of FSR 1.0 may be too expensive to be worth using it over bilinear
+  the cost of FSR1 may be too expensive to be worth using it over bilinear
   scaling.
+- **FSR 2.2:** AMD FidelityFX Super Resolution 2.2 (since Godot 4.2). Slowest,
+  but even higher quality compared to FSR1 and bilinear scaling. On slow GPUs,
+  the cost of FSR2 may be too expensive to be worth using it over bilinear
+  scaling or FSR1. To match FSR2 performance with FSR1, you need to use a lower
+  resolution scale factor.
 
 Here are comparison images between native resolution, bilinear scaling with 50%
-resolution scale and FSR 1.0 scaling with 50% resolution scale:
+resolution scale, FSR1, and FSR2 scaling with 50% resolution scale:
 
 .. image:: img/resolution_scaling_bilinear_0.5.png
 
 .. image:: img/resolution_scaling_fsr1_0.5.png
 
-FSR 1.0 upscaling works best when coupled with another form of antialiasing.
+.. image:: img/resolution_scaling_fsr2_0.5.webp
+
+FSR1 upscaling works best when coupled with another form of antialiasing.
 Temporal antialiasing (TAA) or multisample antialiasing (MSAA) should preferably
 be used in this case, as FXAA does not add temporal information and introduces
 more blurring to the image.
 
+On the other hand, FSR2 provides its own temporal antialiasing. This means you
+don't need to enable other antialiasing methods for the resulting image to look
+smooth. The **Use TAA** project setting is ignored when FSR2 is used as the 3D
+scaling method, since FSR2's temporal antialiasing takes priority.
+
 Here's the same comparison, but with 4× MSAA enabled on all images:
 
 .. image:: img/resolution_scaling_bilinear_msaa_4x_0.5.png
 
 .. image:: img/resolution_scaling_fsr1_msaa_4x_0.5.png
 
-Notice how the edge upscaling of FSR 1.0 becomes much more convincing once 4×
-MSAA is enabled.
+.. image:: img/resolution_scaling_fsr2_msaa_4x_0.5.webp
+
+Notice how the edge upscaling of FSR1 becomes much more convincing once 4×
+MSAA is enabled. However, FSR2 doesn't benefit much from enabling MSAA since it
+already performs temporal antialiasing.
 
 Rendering scale
 ^^^^^^^^^^^^^^^
@@ -165,7 +183,7 @@ in each table.
 FSR Sharpness
 ^^^^^^^^^^^^^
 
-When using the FSR 1.0 scaling mode, the sharpness can be controlled using the
+When using the FSR1 or FSR2 scaling modes, the sharpness can be controlled using the
 **Rendering > Scaling 3D > FSR Sharpness** advanced project setting.
 
 The intensity is inverted compared to most other sharpness sliders: *lower*
@@ -178,12 +196,17 @@ to oversharpening.
 .. note::
 
     If you wish to use sharpening when rendering at native resolution, Godot
-    currently doesn't allow using the sharpening component of FSR (RCAS)
+    currently doesn't allow using the sharpening component of FSR1 (RCAS)
     independently from the upscaling component (EASU).
 
     As a workaround, you can set the 3D rendering scale to ``0.99``, set the
     scaling mode to **FSR 1.0** then adjust FSR sharpness as needed. This allows
-    using FSR 1.0 while rendering at a near-native resolution.
+    using FSR1 while rendering at a near-native resolution.
+
+    Alternatively, you can set the scaling mode to **FSR 2.2** with the 3D
+    rendering scale set to ``1.0`` if you have enough GPU headroom. This also
+    provides high-quality temporal antialiasing. The **FSR Sharpness** setting
+    remains functional in this case.
 
 .. _doc_resolution_scaling_mipmap_bias: