public sealed class FogRendererDepth fog, with an optional height falloff and sun scattering.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
A post-process rather than a per-material term, and that is what makes it affordable: fog depends on the distance from the camera to whatever was drawn, which the depth buffer already holds for every pixel of the frame. Adding it in every material's shader would mean every material carrying the fog's parameters and evaluating it whether it is on or not.
Fields and properties (12)
public required string SourceThe colour it fogs.
public required string DepthThe depth it reads distance from.
public int ModeWhich falloff curve is used.
public bool HeightFalloffWhether fog thins with altitude, as an atmosphere does.
public bool SunScatteringWhether looking toward the sun brightens the fog.
public RenderView? ViewClip space back to world, for reconstructing where a pixel was.
public Matrix4x4 InverseViewProjectionClip back to world, when no View supplies it.
public Vector3 CameraPositionWhere the camera is, which the distance is measured from.
public Vector3 ColourThe fog's colour.
public float DensityHow quickly it accumulates with distance.
public float StartWhere it begins, for the linear mode.
public float EndWhere it is fully opaque, for the linear mode.
Methods (3)
public FogRenderer()Depth fog, with an optional height falloff and sun scattering.
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