public sealed class VignetteRendererThe lens: vignette, chromatic aberration and grain, in one pass because they are one look.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Three effects rather than one, each behind its own permutation, so a frame that wants only grain emits only grain. Together at the end of the chain because all three are what a camera does to an image rather than what a scene does to light — and because each is one or two taps, where three passes would be three full-screen reads of an HDR target.
Fields and properties (19)
public required string SourceThe texture it darkens, tints and grains.
public bool UseVignetteWhether the corners are darkened.
public bool UseChromaticAberrationWhether the channels are offset toward the edges.
public bool UseGrainWhether film grain is added.
public bool LuminanceWeightedGrainWhether grain is scaled by luminance, which is what film actually does.
public bool UseLensDistortionWhether the image is warped radially before anything else reads it.
public Vector3 VignetteColourWhat colour the corners go towards.
public Vector2 VignetteCentreWhere the vignette is centred, in UV.
public float VignetteRoundness0 follows the aspect ratio, 1 is a circle whatever shape the screen is.
public float DistortionIntensityHow far the image is pushed out (positive) or pulled in (negative) at the edges.
public Vector2 DistortionScalePer-axis multipliers, so one axis can be left undistorted.
public Vector2 DistortionCentreWhere the distortion is centred, in UV.
public float DistortionZoomA zoom applied after the warp, to hide the border a positive distortion pulls in.
public float VignetteIntensityHow dark the corners go.
public float VignetteSmoothnessHow gradually the vignette comes on.
public float AberrationStrengthHow far the channels separate at the edge of the frame.
public float GrainIntensityHow much grain is added.
public float GrainScaleHow large the grain is.
public float FrameIndexWhich frame this is, so the grain moves.
Methods (3)
public VignetteRenderer()The lens: vignette, chromatic aberration and grain, in one pass because they are one look.
public void Apply(in PostProcessOverlay overlay)protected override void Configure(CompositorFrame frame, ParameterCollection parameters, IList<ResourceBinding> bindings)Fills in this frame's parameters and bindings.
Used by (2)
- PostEffectFactoryVixen.Rendering.PostFx
- PostEffectTestsVixen.Rendering.PostFx.Tests