Class WorldPostProcessInfo
Namespace: ValveResourceFormat.Renderer.World
Assembly: Renderer.dll
Manages post-processing volumes and current post-processing state for the scene.
public class WorldPostProcessInfoInheritance
object ← WorldPostProcessInfo
Constructors
WorldPostProcessInfo()
Manages post-processing volumes and current post-processing state for the scene.
public WorldPostProcessInfo()Fields
MaxBlendedLuts
The most volume LUTs that can be weighted together in one frame, matching the game's combine shader.
public const int MaxBlendedLuts = 4Field Value
int
Properties
ActiveLuts
Gets the LUTs contributing this frame, strongest last; the remainder up to weight one is the neutral LUT.
public List<WeightedLut> ActiveLuts { get; }Property Value
CurrentState
Gets the post-processing state computed for the current frame.
public PostProcessState CurrentState { get; }Property Value
MasterPostProcessVolume
Gets the master post-process volume: the unbound volume that is the base state everywhere. The first enabled one of the volumes marked master.
public ScenePostProcessVolume? MasterPostProcessVolume { get; }Property Value
MasterTonemapController
env_tonemap_controller is a legacy entity (S1) that still has functionality, so we want to account for it. The way this works is a little unclear, even after quite a bit of testing, but I think an env_tonemap_controller existing in the level overrides the post process volume regardless of if it's set as master. TODO: Test if this applies to post process volumes
public SceneTonemapController? MasterTonemapController { get; set; }Property Value
PostProcessVolumes
Gets the non-master post-process volumes, applied while the camera is inside them.
public List<ScenePostProcessVolume> PostProcessVolumes { get; }Property Value
Methods
AddPostProcessVolume(ScenePostProcessVolume)
Registers a post-process volume, disabled ones included so they can be enabled later. Only the first enabled master volume applies; the rest apply by camera containment.
public void AddPostProcessVolume(ScenePostProcessVolume postProcess)Parameters
postProcess ScenePostProcessVolume
The post-process volume to register.
AddTonemapController(SceneTonemapController, bool)
Registers an env_tonemap_controller. The last one marked master becomes WorldPostProcessInfo.MasterTonemapController, or the first one registered when none is.
public void AddTonemapController(SceneTonemapController controller, bool isMaster)Parameters
controller SceneTonemapController
The controller to register.
isMaster bool
Whether the entity is marked master.
UpdatePostProcessing(Vector3, float)
Recalculates WorldPostProcessInfo.CurrentState: the master volume is the base, and every non-master volume containing the viewer crossfades on top of it over its fade time.
public void UpdatePostProcessing(Vector3 position, float deltaTime)Parameters
position Vector3
The viewer position tested against each volume's collider: the player's feet, or the camera when flying free.
deltaTime float
Elapsed time in seconds since the last frame, driving the crossfades.

