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

Chromatic Lens PostFX

Chromatic aberration and lens distortion post-processing effect.

Chromatic aberration and lens distortion post-processing effect.


Module Overview

PropertyValue
Sourcelua/ge/client/postFx/chromaticLens.lua
Returns- (side-effect module)

Default Parameters

ParameterVariableDefault ValueDescription
Distortion coefficientdistCoeffecient0.0Overall lens distortion strength
Cube distortioncubeDistortionFactor-0.25Barrel/pincushion distortion
Color distortioncolorDistortionFactor"-0.0025 0.0 0.0025"Per-channel (RGB) offset for chromatic aberration

Scene Objects Created

ObjectTypeDescription
PFX_DefaultChromaticLensStateBlockGFXStateBlockDataZ-off, point sampling
PFX_ChromaticLensShaderShaderDatachromaticLens.hlsl shader
ChromaticLensPostFXPostEffectChromatic aberration, priority 100

Globals Set

GlobalTypeDescription
ChromaticLensPostFXCallbackstablesetShaderConsts callback

Callbacks

ChromaticLensPostFXCallbacks.setShaderConsts()

Sets three shader constants on ChromaticLensPostFX:

  • $distCoeff - overall distortion
  • $cubeDistort - barrel distortion factor
  • $colorDistort - RGB channel offsets

PostEffect Configuration

PropertyValue
Render TimePFXAfterDiffuse
Priority100
Enabledfalse (disabled by default)
Reflect PassDisabled
Texture 0$backBuffer
Target$backBuffer

Notes

  • Disabled by default.
  • The default distCoeffecient of 0.0 means no distortion unless modified.
  • Color distortion shifts R and B channels in opposite directions (classic chromatic aberration).
  • Logs to console on every setShaderConsts call (may want to remove in production).

See Also

  • client/postFx - PostFX manager

Caustics PostFX

Underwater caustic light patterns projected onto submerged surfaces.

Client Core

Initializes core rendering resources: materials, shaders, state blocks, and sampler states required by the engine's rendering pipeline.

On this page

Module OverviewDefault ParametersScene Objects CreatedGlobals SetCallbacksChromaticLensPostFXCallbacks.setShaderConsts()PostEffect ConfigurationNotesSee Also