Skip to main content

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_modeModeUse it when
0Off (default)You use Unreal's own AA, or none.
1SMAA 1xYou want a fully spatial image: no ghosting, no blur in motion.
2SMAA TX2You 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 nodeC++ functionReturn valueDescription
Enable SMAA 1xXFSDK_EnableSMAA1X()boolEnables spatial SMAA using the current SMAA tuning settings.
Enable SMAA TX2XFSDK_EnableSMAATX2()boolEnables temporal SMAA TX2 and activates its per-view temporal configuration.
Disable SMAAXFSDK_DisableSMAA()boolDisables XFSDK SMAA without selecting a replacement Unreal Engine AA method.
Get SMAA ModeXFSDK_GetSMAAMode()EXFSDKSMAAModeReturns the currently selected SMAA mode.

SMAA mode enum​

enum class EXFSDKSMAAMode : uint8
{
Disabled,
SMAA1X,
SMAATX2
};

Function behavior​

XFSDK_EnableSMAA1X():

  • Sets r.AntiAliasingMethod to 0.
  • Selects xl_smaa_mode 1.
  • Preserves the current SMAA 1x tuning settings.

XFSDK_EnableSMAATX2():

  • Sets r.AntiAliasingMethod to 0.
  • 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, or SMAATX2.
  • Returns Disabled if 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.
}
}