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

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

FunctionArgsReturnsDescription
M.initRenderManager--Creates AL_FormatToken RenderFormatToken for MSAA-safe deferred rendering

Scene Objects (Created at Load)

ObjectTypeDescription
AL_FormatTokenStateGFXStateBlockDataClamp-point sampler state for format copy
AL_FormatCopyPostEffectPassthrough copy between non-MSAA and device back buffers

Scene Objects (Created by initRenderManager)

ObjectTypeDescription
AL_FormatTokenRenderFormatTokenManages 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

  1. AL_FormatToken creates a non-MSAA render target for deferred lighting
  2. Before the token: AL_FormatCopy copies back buffer contents into $inTex
  3. Deferred lighting renders to the non-MSAA target
  4. After the token: AL_FormatCopy resolves back to the (potentially MSAA) device buffer

Notes

  • AL_FormatCopy is never added to the PostEffectManager - it's used directly by the token
  • Do not call enable() on AL_FormatCopy
  • AL_FormatTokenState inherits from PFX_DefaultStateBlock
  • The depth format is read from the console variable $GFXFormatDefaultDepth
  • aaLevel = 0 disables MSAA; use -1 to match the back buffer

See Also

  • PostFx SSAO - SSAO uses #ssaoMask within 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.

On this page

OverviewPublic APIScene Objects (Created at Load)Scene Objects (Created by initRenderManager)Format Token ConfigurationHow It WorksNotesSee Also