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

Edge AA PostFX

Two-pass edge-detect anti-aliasing: first pass detects edges from the prepass buffer, second pass smooths them.

Two-pass edge-detect anti-aliasing: first pass detects edges from the prepass buffer, second pass smooths them.


Module Overview

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

Scene Objects Created

State Block

ObjectTypeDescription
PFX_DefaultEdgeAAStateBlockGFXStateBlockDataZ-disabled, point sampling (2 slots)

Shaders

ObjectTypeShader FilesDescription
PFX_EdgeAADetectShaderShaderDataedgeaa/edgeDetectP.hlslEdge detection from prepass normals/depth
PFX_EdgeAAShaderShaderDataedgeaa/edgeAAV.hlsl + edgeAAP.hlslEdge-aware smoothing
PFX_EdgeAADebugShaderShaderDataedgeaa/dbgEdgeDisplayP.hlslDebug: visualize detected edges

PostEffects

ObjectRender TimeEnabledDescription
EdgeDetectPostEffectPFXBeforeBin (ObjTranslucentBin)YesEdge detection at 50% resolution → #edge
EdgeAAPostEffectPFXAfterDiffuseYesApply AA using #edge + $backBuffer
Debug_EdgeAAPostEffectPFXAfterDiffuseNoDebug display of edge buffer

Render Pipeline

Pass 1: EdgeDetectPostEffect
  Input:  #prepass[RT0], #prepass[Depth]
  Output: #edge (half resolution)

Pass 2: EdgeAAPostEffect
  Input:  #edge, $backBuffer
  Output: $backBuffer (smoothed)

Debug: Debug_EdgeAAPostEffect
  Input:  #edge
  Output: $backBuffer (edge overlay)

Notes

  • Edge detection runs at 50% resolution (targetScale = "0.5 0.5") for performance.
  • EdgeDetectPostEffect is enabled by default (unlike most other PostFX).
  • The debug PostEffect is disabled by default - enable to visualize detected edges.
  • Edge detection uses prepass normals and depth for geometry-aware detection.

See Also

  • client/postFx - PostFX manager

Depth of Field PostFX

Multi-pass depth-of-field post-processing effect with auto-focus support (vehicle tracking or center raycast) and configurable near/far blur equations.

PostFx Flash Effect

Screen flash post-processing effect for damage and whiteout visual feedback. Creates a `FlashFx` PostEffect driven by shader constants for damage flash intensity and whiteout amount.

On this page

Module OverviewScene Objects CreatedState BlockShadersPostEffectsRender PipelineNotesSee Also