Interface SmaaPostProcessTaskConfig
alphaMode?: PostProcessAlphaMode;
clear?: boolean;
cornerDetection?: boolean;
diagonalDetection?: boolean;
dominantAxisBlend?: boolean;
maxSearchSteps?: number;
minDiagonalRun?: number;
name?: string;
sourceIsSrgb?: boolean;
sourceSamplingMode?: PostProcessSamplingMode;
sourceTexture: RenderTarget;
targetTexture?: RenderTarget | null;
threshold?: number;
viewport?: NormalizedViewport | null;
}
Hierarchy (View Summary)
- PostProcessTaskSettings
- SmaaPostProcessTaskConfig
Properties
Optionalalpha Mode
Optionalclear
Clear the target before drawing. Set false when several viewport passes share a target.
Optionalcorner Detection
Attenuate weights near axis-aligned corner patterns (default false).
This uses reference SMAA's 25% corner-rounding preset. It substantially reduces unwanted blending on corner-heavy content, but adds four edge-texture reads for each horizontal or vertical edge processed. When disabled the uniform branch performs none of those reads.
Optionaldiagonal Detection
Detect 45-degree patterns as well as horizontal/vertical ones (default false).
Reference SMAA enables its diagonal path by default; this one is off because MEASURED on hard-surface interior content it never beat leaving it off — 4.3% better than no-AA with it off, against 0.0/1.7/2.5/3.3/3.7% at minimum runs of 2/3/4/6/10, i.e. it only approaches the off result as it stops firing. See minDiagonalRun for the likely reason. Turn it on for content with genuine 45-degree structure, and measure.
Optionaldominant Axis Blend
Blend along the stronger axis only, as canonical SMAA does (default true). With it off,
all four neighbours are mixed, which at a corner or a crossing pulls in pixels from around
the corner and rounds it off.
Optionalmax Search Steps
How far the pattern search runs along an edge, in pixels (default 16, max 112). Longer
runs reconstruct shallower slopes — a nearly-horizontal line needs a long search — at the cost
of more texture fetches per edge pixel. Non-finite values fall back to the default.
Optionalmin Diagonal Run
Shortest diagonal run, in pixels, that counts as a 45-degree pattern (default 4).
Raising it makes detection more selective. Note the known weakness of this simplified model: for a MAIN-diagonal edge the left edges and the matching top edges land on ADJACENT diagonals, so the diagonal path claims one and the orthogonal path claims the other, and the same edge gets two different reconstructions. Reference SMAA avoids that by resolving both through one area lookup. Fixing it here needs the neighbouring diagonal to be suppressed in step, which is why this is off by default rather than merely tuned.
Optionalname
Optionalsource Is Srgb
Set when sourceTexture is an sRGB view (e.g. bgra8unorm-srgb).
Sampling an sRGB view DECODES to linear, so luma — and therefore the fixed threshold —
would be measured in linear space, where dark regions are compressed and far fewer edges
clear the bar. Reference SMAA requires edge detection to read non-sRGB values. With this set,
the edge pass re-encodes each sample before taking luma, so the threshold means the same
thing either way. Only edge DETECTION is affected; neighbourhood blending still works on the
decoded values, which is what it should do.
Optionalsource Sampling Mode
Source sampling is fixed per pass and not user-configurable — see record().
source Texture
Optionaltarget Texture
Optionalthreshold
Luma difference that counts as an edge (default 0.05). Lower catches more edges and more
noise; measured on hard-surface content, gains are flat from 0.03–0.08 and fall away by 0.15.
Configuration for
createSmaaPostProcessTask.