Video Tutorials
How To
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Light Sources
World Objects
Sound Objects
Pathfinding Objects
Setting Up Development Environment
Usage Examples
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
Double Precision Coordinates
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Content Creation
Content Optimization
Art Samples

Subpixel Reconstruction Anti-Aliasing (SRAA)

Subpixel Reconstruction Anti-Aliasing (SRAA) is an additional anti-aliasing technique that restores small image details. It also provides a net speedup and minimal overhead compared to supersampling. It is recommended to combine this technique with TAA for better anti-aliasing quality.

How SRAA works#

SRAA is used in deferred rendering to achieve high-quality anti-aliasing by sampling geometry at higher resolution than shading, since shading usually changes more slowly than geometry.

There are two stages in SRAA:

  1. Depth prepass multisampling generates depth position information at subpixel resolution. Subpixels are subdivision cells of a pixel. Depth prepass samples the geometry in the screen-space and stores samples’ position information in a G-buffer.
  2. Reconstruction pass uses the custom filter after the deferred shading to refine the shading results and output a screen-resolution, antialiased frame. In the picture below you can see how the SRAA reconstructs one subpixel. At each geometric sample, all shaded neighbors in a fixed radius are considered and their values are interpolated using our custom filter with weights to restore subpixel details. A neighboring sample with significantly different depth is considered to be across a geometric edge (blue line), and receives a low weight. The filter weights estimate distance between source and target samples by comparing their depth values.

UNIGINE's implementation of SRAA uses a depth threshold method to identify areas of the frame with edges. This way we eliminate the blur problem that comes from applying a smoothing filter to areas with no depth variation. Despite the fact that this approach uses only depth it keeps acceptable quality and represents a good trade-off for the sake of performance.

Pros and Cons of SRAA:
     + Subpixel details and geometry reconstruction.
     - Costs performance.

SRAA Adjustment#

Subpixel Reconstruction Anti-Aliasing (SRAA) settings are available for adjustment via the Render -> Antialiasing section of the Settings window, along with Fast approXimate Anti-Aliasing (FXAA), Temporal Anti-Aliasing (TAA) and Supersampling settings. The following settings are available when the Custom preset for Anti-Aliasing is selected.

SRAA Settings

Anti-Aliasing Settings

SRAA Settings#

SRAA Toggles SRAA on and off.
Can be controlled by render_sraa console command.
Samples The number of depth geometry samples per pixels. Greater values enhance the anti-aliasing effect but can cause drops in performance.
Can be controlled by render_sraa_samples console command.
Depth Threshold Depth threshold for edges detection that specifies the area for the SRAA processing. Turn on the debug mode and adjust this parameter in such a way that covers the required edges but at the same time leaves out the unnecessary geometry in the scene.
Can be controlled by render_sraa_depth_threshold console command.
Show Debug Shows the geometry edges smoothed by the SRAA.
Can be controlled by render_sraa_debug console command.
Use TAA Specifies if the SRAA should use the shading sample from the previously rendered frame to achieve correct anti-aliasing. It is recommended to use this option by default.
  • Uses camera jittering, so it works only when the TAA is enabled.
  • Can be controlled by render_sraa_temporal console command.

Known Limitations#

The SRAA method does not work with transparent objects in the background because the reconstruction phase restores details after the deferred shading, while the transparent objects are rendered later in forward shading pass.

Nevertheless, the UNIGINE supports SRAA with the following objects on screen: water and clouds (the render_clouds_transparent_order console command must be set to 0 for the clouds rendering).

Last update: 2021-04-01