Render Manager
Initializes the Advanced Lighting (AL) render format token and MSAA copy PostEffect. Ensures driver MSAA does not interfere with deferred lighting passes.
Initializes the Advanced Lighting (AL) render format token and MSAA copy PostEffect. Ensures driver MSAA does not interfere with deferred lighting passes.
Overview
Returns a standard M module with one initialization function. Also creates two scene objects at load time for the AL format resolve pipeline.
Public API
| Function | Args | Returns | Description |
|---|---|---|---|
M.initRenderManager | - | - | Creates AL_FormatToken RenderFormatToken for MSAA-safe deferred rendering |
Scene Objects (Created at Load)
| Object | Type | Description |
|---|---|---|
AL_FormatTokenState | GFXStateBlockData | Clamp-point sampler state for format copy |
AL_FormatCopy | PostEffect | Passthrough copy between non-MSAA and device back buffers |
Scene Objects (Created by initRenderManager)
| Object | Type | Description |
|---|---|---|
AL_FormatToken | RenderFormatToken | Manages non-MSAA render target for AL passes |
Format Token Configuration
local alFormatToken = createObject("RenderFormatToken")
alFormatToken.enabled = false
alFormatToken:setField("format", 0, "GFXFormatR8G8B8A8")
alFormatToken:setField("depthFormat", 0, getConsoleVariable("$GFXFormatDefaultDepth"))
alFormatToken.aaLevel = 0 -- No MSAA for deferred passes
-- Copy effects for format token transitions
alFormatToken:setField("copyEffect", 0, "AL_FormatCopy")
alFormatToken:setField("resolveEffect", 0, "AL_FormatCopy")How It Works
AL_FormatTokencreates a non-MSAA render target for deferred lighting- Before the token:
AL_FormatCopycopies back buffer contents into$inTex - Deferred lighting renders to the non-MSAA target
- After the token:
AL_FormatCopyresolves back to the (potentially MSAA) device buffer
Notes
AL_FormatCopyis never added to the PostEffectManager - it's used directly by the token- Do not call
enable()onAL_FormatCopy AL_FormatTokenStateinherits fromPFX_DefaultStateBlock- The depth format is read from the console variable
$GFXFormatDefaultDepth aaLevel = 0disables MSAA; use-1to match the back buffer
See Also
- PostFx SSAO - SSAO uses
#ssaoMaskwithin the AL pipeline - PostFx Fog - Fog uses prepass textures from the AL pipeline
Client PostFX Manager
Central manager for all post-processing effects (PostFX). Handles initialization, preset loading/saving, backup/restore, and per-effect settings synchronization (SSAO, HDR, DOF, LightRays).
Advanced Lighting - Shaders
Defines all shader data, state blocks, and custom materials for the Advanced Lighting deferred rendering pipeline: vector lights (sun), point lights, spot lights, and particle point lights.