Class PostProcessRenderer
Namespace: ValveResourceFormat.Renderer.PostProcess
Assembly: Renderer.dll
Post-processing renderer for tonemapping, color grading, and adaptive exposure.
public class PostProcessRendererInheritance
Constructors
PostProcessRenderer(RendererContext)
Initializes a new using the given renderer context.
public PostProcessRenderer(RendererContext rendererContext)Parameters
rendererContext RendererContext
The renderer context providing shader loading and mesh buffer access.
Properties
AverageLuminance
Gets or sets the scene average luminance used for auto-exposure calculations.
public float AverageLuminance { get; set; }Property Value
Bloom
Gets the bloom renderer used for the multi-pass Gaussian bloom effect.
public BloomRenderer Bloom { get; }Property Value
BlueNoise
Gets or sets the blue noise texture used for dithering in the tonemap pass.
public RenderTexture? BlueNoise { get; set; }Property Value
ColorCorrectionEnabled
Gets or sets a value indicating whether color correction LUT application is active.
public bool ColorCorrectionEnabled { get; set; }Property Value
CurrentExposure
Gets the smoothed exposure value applied in the current frame.
public float CurrentExposure { get; }Property Value
CustomExposure
Gets or sets a manually overridden exposure value; set to -1 to use auto-exposure.
public float CustomExposure { get; set; }Property Value
DOF
Gets the depth-of-field renderer.
public DOFRenderer DOF { get; }Property Value
DefaultColorFormat
Gets the HDR color attachment format used by post-process framebuffers.
public static Framebuffer.AttachmentFormat DefaultColorFormat { get; }Property Value
Enabled
Gets or sets a value indicating whether post-processing is active.
public bool Enabled { get; set; }Property Value
ExposureHistory
Gets the per-frame raw exposure scalar history used for temporal smoothing.
public List<float> ExposureHistory { get; }Property Value
HasOutlineObjects
Gets or sets a value indicating whether any scene objects require outline rendering this frame.
public bool HasOutlineObjects { get; set; }Property Value
State
Gets or sets the current post-processing state (tonemap, bloom, exposure settings).
public PostProcessState State { get; set; }Property Value
TargetExposure
Gets the target exposure value that is adapting towards.
public float TargetExposure { get; }Property Value
TonemapScalar
Gets or sets the final linear tonemap scalar passed to the post-process shader.
public float TonemapScalar { get; set; }Property Value
Methods
CalculateTonemapScalar(float)
Updates based on auto-exposure logic or .
public void CalculateTonemapScalar(float deltaTime)Parameters
deltaTime float
Elapsed time in seconds since the last frame, used for exposure adaptation speed.
Load(int)
Loads all post-processing shaders and initializes sub-renderers for the given MSAA sample count.
public void Load(int msaaSamples)Parameters
msaaSamples int
The MSAA sample count used to select shader variants.
Render(Framebuffer, Framebuffer, RenderTexture, Camera, bool)
Resolves MSAA, applies DOF/bloom, tonemaps, and writes the final LDR image to colorBufferDraw.
public void Render(Framebuffer colorBufferRead, Framebuffer colorBufferDraw, RenderTexture resolveTarget, Camera camera, bool flipY)Parameters
colorBufferRead Framebuffer
colorBufferDraw Framebuffer
resolveTarget RenderTexture
camera Camera
flipY bool
ResolveMsaa(Framebuffer, RenderTexture, RenderTexture, bool, bool)
Resolves MSAA color and/or depth from source using compute shaders. Color and depth are written to standalone RenderTexture targets. Uses Karis average for HDR-aware color resolve, min filter for depth (conservative for reverse-Z).
public void ResolveMsaa(Framebuffer source, RenderTexture destColor, RenderTexture destDepth, bool resolveColor, bool resolveDepth)Parameters
source Framebuffer
destColor RenderTexture
destDepth RenderTexture
resolveColor bool
resolveDepth bool

