RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
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