Vixen
02b45cc4
csharp
public struct PostProcessVolume

A box that says how the frame looks inside it.

Read the guide page for this →

Remarks

Where a look applies, rather than which effects exist. A compositor document names the frame's passes and cannot know the player has walked into a cellar; this is how a level says so, and a designer places one rather than writing code or a second document.

⚠ It blends parameters and cannot add a pass. The frame's graph decides resource lifetimes, pass ordering and transient aliasing, and rebuilding it as somebody crosses a threshold would be a graph recompile per frame. So a volume that sets MaximumDefocus in a document with no !DepthOfField node does nothing at all, and cannot say so at author time. Unreal has the same constraint and hides it inside one uber-pass; here the passes are named in a file you can read, which is what makes this statable — see [32](../../../docs/plan/32-post-process-volumes.md).

Its bounds are in the entity's own space, so a rotated entity is a rotated box and the containment test runs in the volume's frame rather than in the world's. Scale counts: a volume scaled by two reaches twice as far.

⚠ A zeroed component is inert rather than global. Zero extents contain nothing and a zero weight applies nothing, which is what an entity that has just been given the component should do — the alternative, treating a zeroed volume as unbounded, would make adding one in the inspector black out the level. Default is what a create menu uses.

Fields and properties (7)

  • public Vector3 Extents

    Half the box's size, in the entity's own space.

  • public float BlendRadius

    How far outside the box it fades in, in metres.

  • public float Weight

    A master multiplier on everything it contributes, 0 to 1.

  • public int Priority

    Which volume wins where two overlap. Higher is on top.

  • public bool Unbound

    Whether it applies everywhere, ignoring its bounds.

  • public PostProcessSettings Settings

    What it has an opinion about.

  • public static PostProcessVolume Default

    A five-metre cube that fades over one metre and applies fully inside.

Methods (1)

  • public readonly float Falloff(Vector3 local)

    How much this volume applies at a point, before its Weight.

Used by (8)

  • ComponentRegistrationVixen.Rendering
  • PostProcessVolumeSystemVixen.Rendering
  • PostProcessVolumeTestsVixen.Rendering.Tests
  • TypeRegistrationVixen.Rendering
  • Vixen_Rendering_Ecs_PostProcessVolumeSerializerVixen.Rendering
  • ComponentsViewVixen.Editor.App
  • MaterialIconsVixen.Editor.App
  • SceneLinesVixen.Editor.SceneView