Vixen
02b45cc4
csharp
public sealed class TemporalAntialiasingRenderer

Temporal antialiasing: the frame resolved against the ones before it.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The default antialiasing where it can run, and the only one that adds information rather than hiding its absence. FXAA finds edges in a frame and softens them; this jitters the camera by a fraction of a pixel each frame and accumulates the results, so a slow pan genuinely resolves detail below one pixel — which is also why it doubles as the sampling budget for anything stochastic downstream.

It owns its history, and that is the whole difference from every other effect here. A pass cannot read the target it writes, so there are two textures and the node alternates them: this frame reads the one last frame wrote and writes the other. They are imports rather than graph resources, because a transient is dead at the end of the frame and a history that dies every frame is a history of nothing.

The jitter is the host's, and it has to be. This pass resolves samples taken at different subpixel offsets; taking them is the camera's job, before anything is drawn. Jitter is the sequence to offset the projection by — a pass that accumulated an unjittered camera would average the same sample over and over, which is a frame that gets blurrier and no sharper.

Fields and properties (9)

  • public required string Source

    The frame it antialiases.

  • public required string MotionVectors

    Where each pixel was last frame, in screen space.

  • public required string Depth

    The depth, for rejecting history across a silhouette.

  • public bool VarianceClipping

    Whether history is clipped to the neighbourhood's variance rather than its bounds.

  • public float Feedback

    How much of the history survives each frame, 0 to 1.

  • public float VarianceGamma

    How many standard deviations of the neighbourhood the history may be.

  • public bool HasHistory

    Whether the history holds anything yet.

  • public TextureHandle Target

    The texture this frame resolves into.

  • public TextureHandle History

    The texture this frame reads its history from.

Methods (5)

  • public TemporalAntialiasingRenderer()

    Temporal antialiasing: the frame resolved against the ones before it.

  • public static Vector2 Jitter(int frameIndex)

    The subpixel offset to jitter the projection by, in pixels, for a frame index.

  • protected override void DeclareOutput(CompositorFrame frame, Int2 size)

    Declares the resource this effect writes.

  • protected override void Configure(CompositorFrame frame, ParameterCollection parameters, IList<ResourceBinding> bindings)

    Fills in this frame's parameters and bindings.

  • protected override void Dispose(bool disposing)

    Releases the pass's pipelines and its uniform buffer.

Used by (2)

  • PostEffectFactoryVixen.Rendering.PostFx
  • PostEffectTestsVixen.Rendering.PostFx.Tests