RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

server/commands - Camera & Input Commandsge_utils - Game Engine Utility Functionsmain.lua - GE Lua Entry Point & Game Loopmap.lua - Navigation Graph (AI Road Map)screenshot.lua - Screenshot Systemserver/server - Level Loading & Game ServerserverConnection - Client-Server Connection Manager`setSpawnpoint` - Default Spawn Point Persistence`simTimeAuthority` - Simulation Time & Bullet Time Control`spawn` - Vehicle Spawning & Safe Placement`suspensionFrequencyTester` - Suspension Natural Frequency Analysis
Client CanvasCaustics PostFXChromatic Lens PostFXClient CoreDepth of Field PostFXEdge AA PostFXPostFx Flash EffectPostFx Fog EffectsPostFx FXAA Anti-AliasingGamma PostFXPostFx Glow EffectShadow Maps InitClient LightingPostFx Light Ray EffectAdvanced Lighting - Light VisualizationPostFx Masked Screen BlurMotion Blur PostFXObjects Required for StartupClient Parse ArgsClient PostFX ManagerRender ManagerAdvanced Lighting - ShadersBasic Lighting - Shadow FilterAdvanced Lighting - Shadow VisualizationPostFx SMAA Anti-AliasingPostFx SSAO (Screen-Space Ambient Occlusion)PostFx Turbulence EffectPostFx Utilities

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

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

PropertyValue
Sourcelua/ge/client/lighting/advanced/shadowViz.lua
Returns- (side-effect module)
DependenciesAL_DepthVisualizeState from lightViz.lua

Scene Objects Created

ObjectTypePurpose
AL_ShadowVisualizeShaderShaderDataguiMaterialV.hlsl + dbgShadowVisualizeP.hlsl
AL_ShadowVisualizeMaterialCustomMaterialRenders shadow map texture with depth color mapping

Sampler Bindings

SamplerTextureDescription
shadowMap#AL_ShadowVizTextureShadow map to visualize
depthVizdepthVizDepth-to-color lookup

Commented TorqueScript Functions

The file contains commented-out TorqueScript for editor integration:

FunctionPurpose
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_DepthVisualizeState state block (defined in lightViz.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.

On this page

Module OverviewScene Objects CreatedSampler BindingsCommented TorqueScript FunctionsNotesSee Also