API ReferenceGE ExtensionsClient
Advanced Lighting - Shadow Visualization
Provides a shader and custom material for visualizing shadow maps in the editor/debug views.
Provides a shader and custom material for visualizing shadow maps in the editor/debug views.
Module Overview
| Property | Value |
|---|---|
| Source | lua/ge/client/lighting/advanced/shadowViz.lua |
| Returns | - (side-effect module) |
| Dependencies | AL_DepthVisualizeState from lightViz.lua |
Scene Objects Created
| Object | Type | Purpose |
|---|---|---|
AL_ShadowVisualizeShader | ShaderData | guiMaterialV.hlsl + dbgShadowVisualizeP.hlsl |
AL_ShadowVisualizeMaterial | CustomMaterial | Renders shadow map texture with depth color mapping |
Sampler Bindings
| Sampler | Texture | Description |
|---|---|---|
shadowMap | #AL_ShadowVizTexture | Shadow map to visualize |
depthViz | depthViz | Depth-to-color lookup |
Commented TorqueScript Functions
The file contains commented-out TorqueScript for editor integration:
| Function | Purpose |
|---|---|
toggleShadowViz() | Toggle shadow viz overlay dialog |
_setShadowVizLight(light, force) | Set which light's shadow to visualize |
showShadowVizForLight(light) | Show viz for specific light from console |
lockShadowViz() / unlockShadowViz() | Prevent/allow editor selection changes |
Notes
- Uses
AL_DepthVisualizeStatestate block (defined inlightViz.lua). - The GUI overlay (
AL_ShadowVizOverlayCtrl) is referenced but not created in Lua - it's a legacy TorqueScript UI element. - Pixel version 5.0.
See Also
- client/lighting/advanced/lightViz - Light buffer visualizers
- client/lighting/advanced/shaders - Light shaders
Basic Lighting - Shadow Filter
Two-pass (horizontal + vertical) Gaussian blur filter for Basic Lighting projected shadows.
PostFx SMAA Anti-Aliasing
Enhanced Subpixel Morphological Anti-Aliasing (SMAA) post-processing effect. Three-pass pipeline: edge detection, blending weight calculation, and neighborhood blending.