API ReferenceGE ExtensionsClient
PostFx FXAA Anti-Aliasing
NVIDIA FXAA 3.11 (Fast Approximate Anti-Aliasing) post-processing effect by Timothy Lottes. Provides edge-smoothing as an alternative to SMAA.
NVIDIA FXAA 3.11 (Fast Approximate Anti-Aliasing) post-processing effect by Timothy Lottes. Provides edge-smoothing as an alternative to SMAA.
Overview
Declarative setup script (no M module). Registers:
FXAA_StateBlock- Clamp-linear sampler stateFXAA_ShaderData- Vertex/pixel shader pair for FXAAFXAA_PostEffect- PostEffect (disabled by default, renders after diffuse)FXAA_PostEffectCallbacks- Disables SMAA when FXAA is enabled
Scene Objects
| Object | Type | Default Enabled | Description |
|---|---|---|---|
FXAA_PostEffect | PostEffect | false | FXAA anti-aliasing pass |
FXAA_StateBlock | GFXStateBlockData | - | Linear clamp sampler for color texture |
FXAA_ShaderData | ShaderData | - | FXAA 3.11 shader implementation |
Global Callbacks
| Global | Callback | Description |
|---|---|---|
FXAA_PostEffectCallbacks | onEnabled() | Disables SMAA_PostEffect to prevent dual AA |
Mutual Exclusion
FXAA and SMAA are mutually exclusive. Enabling one disables the other:
-- When FXAA is enabled, SMAA gets disabled
fxaa_PostEffectCallbacks.onEnabled = function()
local smaa_postfx = scenetree.findObject("SMAA_PostEffect")
if smaa_postfx then
smaa_postfx:disable()
end
return true
endPipeline
$backBuffer → FXAA_ShaderData → $backBufferThe effect reads from and writes back to the back buffer in a single pass.
Notes
- Shader pixel version 5.0
- Reflection passes excluded (
allowReflectPass = false) - Internal quality/performance settings can be tuned in
shaders/common/postFx/fxaa/fxaaP.hlsl - Based on Timothy Lottes' FXAA blog
See Also
- PostFx SMAA - Alternative anti-aliasing (mutually exclusive)
- PostFx Utils - Preset management