API ReferenceGE ExtensionsClient
Advanced Lighting - Light Visualization
Debug visualization post effects for the Advanced Lighting deferred rendering pipeline: depth, normals, light color, light specular, and annotation buffers.
Debug visualization post effects for the Advanced Lighting deferred rendering pipeline: depth, normals, light color, light specular, and annotation buffers.
Module Overview
| Property | Value |
|---|---|
| Source | lua/ge/client/lighting/advanced/lightViz.lua |
| Returns | - (side-effect module) |
| Dependencies | Sampler states from client/core |
PostEffect Visualizers
| PostEffect | Shader | Visualizes |
|---|---|---|
AL_DepthVisualize | AL_DepthVisualizeShader | Depth buffer (color-mapped via depthviz.png) |
AL_NormalsVisualize | AL_NormalsVisualizeShader | World-space normals from prepass |
AL_LightColorVisualize | AL_LightColorVisualizeShader | Light info buffer (diffuse) |
AL_LightSpecularVisualize | AL_LightSpecularVisualizeShader | Light info buffer (specular) |
AnnotationVisualize | AnnotationVisualizeShader | Annotation buffer overlay |
All render at priority 9999 to $backBuffer.
State Blocks
| Object | Purpose |
|---|---|
AL_DepthVisualizeState | Z-disabled, point sampling for prepass + depth |
AL_DefaultVisualizeState | Alpha-blended overlay, z-disabled |
Global Functions
| Function | Args | Description |
|---|---|---|
toggleLightVisualizer | objName, enable, tsVariable | Toggle/enable/disable a visualizer PostEffect |
toggleAnnotationVisualize | enable | Toggle annotation buffer overlay |
toggleDepthViz | enable | Toggle depth visualization |
toggleNormalsViz | enable | Toggle normals visualization |
toggleLightColorViz | enable | Toggle light color visualization |
toggleLightSpecularViz | enable | Toggle light specular visualization |
Global Callback Tables
| Global | Purpose |
|---|---|
AL_DepthVisualizeCallbacks | onEnabled - deactivates previous viz mode |
AL_NormalsVisualize | onEnabled callback |
AL_LightColorVisualizeCallbacks | onEnabled callback |
AL_LightSpecularVisualizeCallbacks | onEnabled callback |
AnnotationVisualizeCallbacks | onEnabled / onDisabled - controls Engine.Annotation.enable() |
Usage Example
-- Toggle depth visualization from console
toggleDepthViz(true)
-- Toggle off
toggleDepthViz(false)
-- Toggle (flip current state)
toggleDepthViz()Notes
- Only one visualizer can be active at a time; enabling one disables the previous.
- Annotation visualization requires
Engine.Annotationmodule to exist. - All visualizer PostEffects are disabled by default.
See Also
- client/lighting/advanced/init - Advanced Lighting init
- client/lighting/advanced/shadowViz - Shadow visualization
PostFx Light Ray Effect
Volumetric light ray (god ray) post-processing effect. Two-pass pipeline: occlusion detection followed by radial light scattering.
PostFx Masked Screen Blur
Masked Gaussian screen blur effect using a texture mask to selectively blur screen regions. Uses DOF-style Gaussian blur shaders with a blend pass.