Anti-Aliasing in XFSDK Light
XFSDK Light provides SMAA 1x, SMAA TX2, and optional RCAS sharpening. The Enhanced SMAA tuning guide covers both modes. Use the Light prefix xl_smaa_ for the controls shown there.
xl_smaa_mode | Mode | Use it when |
|---|---|---|
0 | Off (default) | You use Unreal's own AA, or none. |
1 | SMAA 1x | You want a fully spatial image: no ghosting, no blur in motion. |
2 | SMAA TX2 | You want SMAA plus a two-frame temporal blend that cleans up subpixel shimmer. |
Set r.AntiAliasingMethod=0 in your project so the engine does not run its own AA on top.
Runtime SMAA API
XFSDK Light exposes four public functions for selecting and querying SMAA at runtime.
Exposed functions
The Blueprint nodes are available under XFSDK Light → Anti-Aliasing.
| Blueprint node | C++ function | Return value | Description |
|---|---|---|---|
| Enable SMAA 1x | XFSDK_EnableSMAA1X() | bool | Enables spatial SMAA using the current SMAA tuning settings. |
| Enable SMAA TX2 | XFSDK_EnableSMAATX2() | bool | Enables temporal SMAA TX2 and activates its per-view temporal configuration. |
| Disable SMAA | XFSDK_DisableSMAA() | bool | Disables XFSDK SMAA without selecting a replacement Unreal Engine AA method. |
| Get SMAA Mode | XFSDK_GetSMAAMode() | EXFSDKSMAAMode | Returns the currently selected SMAA mode. |
SMAA mode enum
enum class EXFSDKSMAAMode : uint8
{
Disabled,
SMAA1X,
SMAATX2
};
Function behavior
XFSDK_EnableSMAA1X():
- Sets
r.AntiAliasingMethodto0. - Selects
xl_smaa_mode 1. - Preserves the current SMAA 1x tuning settings.
XFSDK_EnableSMAATX2():
- Sets
r.AntiAliasingMethodto0. - Selects
xl_smaa_mode 2. - Causes the scene-view extension to apply the required temporal configuration per supported view.
- Installs SMAA TX2 through Unreal Engine's third-party temporal-upscaler path.
- Uses a two-position temporal jitter sequence.
- Forces native-resolution rendering while TX2 is active.
XFSDK_DisableSMAA():
- Selects
xl_smaa_mode 0. - Does not select or restore an Unreal Engine anti-aliasing method.
XFSDK_GetSMAAMode():
- Returns
Disabled,SMAA1X, orSMAATX2. - Returns
Disabledif the SMAA mode console variable is unavailable.
The enable and disable functions return false if a required console variable is unavailable.
C++ setup
Add XFSDK_System to the consuming module:
PrivateDependencyModuleNames.AddRange(
new string[]
{
"XFSDK_System"
});
Include the public API header:
#include "XFSDK_SMAA_API.h"
Enable spatial SMAA:
const bool bEnabled = UXFSDKSMAAAPI::XFSDK_EnableSMAA1X();
Enable SMAA TX2:
const bool bEnabled = UXFSDKSMAAAPI::XFSDK_EnableSMAATX2();
Query the selected mode:
const EXFSDKSMAAMode Mode = UXFSDKSMAAAPI::XFSDK_GetSMAAMode();
Disable SMAA:
const bool bDisabled = UXFSDKSMAAAPI::XFSDK_DisableSMAA();
Example graphics setting
void UMyGraphicsSettings::SetTemporalSMAA(const bool bEnabled)
{
const bool bApplied = bEnabled
? UXFSDKSMAAAPI::XFSDK_EnableSMAATX2()
: UXFSDKSMAAAPI::XFSDK_DisableSMAA();
if (!bApplied)
{
// The requested SMAA configuration could not be applied.
}
}