RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
HDR Post-ProcessingOpenXR VRRender ViewsOffscreen View Demo

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 Extensionsrender

HDR Post-Processing

Initializes the HDR post-processing chain (bright pass, downscale, luminance, combine) on first update. Creates engine-level PostEffect objects if they don't already exist.

Initializes the HDR post-processing chain (bright pass, downscale, luminance, combine) on first update. Creates engine-level PostEffect objects if they don't already exist.


Public API

FunctionSignatureDescription
M.onFirstUpdate()Creates HDR post-effect objects in the scene tree
M.onSerialize()Returns {initialized = true} to persist state across Lua reloads
M.onDeserialized(data)Restores initialized flag from serialized data

Internals

Post-Effect Chain (created in order)

Object NameClassParentProperties
PostEffectBrightPassObjectPostEffectBrightPassrootrenderTime=PFXBeforeBin, renderBin=AfterPostFX, targetScale=0.5 0.5
PostEffectDownScaleObjectPostEffectDownScaleBrightPasstargetScale=0.5 0.5
PostEffectLuminanceObjectPostEffectLuminanceBrightPass(defaults)
PostEffectCombinePassObjectPostEffectCombinePassBrightPass(defaults)

How It Works

  1. onFirstUpdate checks for null graphics device - skips if running headless
  2. Looks up each post-effect object in the scene tree via scenetree.findObject
  3. Creates missing objects with createObject() and registers them
  4. DownScale, Luminance, and CombinePass are added as children of BrightPass
  5. The initialized flag prevents re-creation across hot-reloads

Usage Examples

-- Normally loaded automatically by the engine render pipeline
-- The extension creates objects once and they persist in the scene tree

-- Check if bright pass exists
local bp = scenetree.findObject("PostEffectBrightPassObject")
if bp then
  -- HDR chain is initialized
end

Key Notes

  • Idempotent: safe to call multiple times - only creates objects that don't exist
  • Skips initialization if a null graphics adapter is detected (headless/server mode)
  • All four post-effect objects form the bloom/HDR pipeline
  • Target scale of 0.5 0.5 means half-resolution render targets for performance

See Also

  • Render OpenXR - VR/XR Runtime Management - Related reference
  • Render Views - Offscreen Camera Screenshots - Related reference
  • Render View Demo - Render View Usage Example - Related reference
  • Game Engine Overview - Guide

Remote Control HTTP

Provides a simple HTTP server that exposes REST-style endpoints for remote vehicle control. Registers a virtual input device and emits axis/button events over HTTP.

OpenXR VR

Manages the OpenXR VR session lifecycle: toggling on/off, welcome dialog, debug ImGui panel, headset centering, state tracking, and error handling.

On this page

Public APIInternalsPost-Effect Chain (created in order)How It WorksUsage ExamplesKey NotesSee Also