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

PostFx Masked Screen Blur

Masked Gaussian screen blur effect using a texture mask to selectively blur screen regions. Uses DOF-style Gaussian blur shaders with a blend pass.

Masked Gaussian screen blur effect using a texture mask to selectively blur screen regions. Uses DOF-style Gaussian blur shaders with a blend pass.


Overview

Declarative setup script (no M module). Registers a 4-stage blur pipeline:

  1. Downsample - Passthrough at 40% scale
  2. Vertical Blur - Gaussian blur in Y direction (DOF shader)
  3. Horizontal Blur - Gaussian blur in X direction
  4. Masked Blend - Blends blurred result with original using #screenBlurMask

Scene Objects

ObjectTypeDescription
ScreenBlurFX_YShaderShaderDataDOF Gaussian blur (vertical)
ScreenBlurFX_XShaderShaderDataDOF Gaussian blur (horizontal, inherits Y)
ScreenBlurFX_stateBlockGFXStateBlockDataZ-disabled, clamp linear + clamp point samplers
SimpleBlendShaderShaderDataBlends original + blurred using mask texture
SimpleBlendShaderStateBlockGFXStateBlockDataZ-disabled, 3 linear clamp samplers
ScreenBlurFXPostEffectMaskedBlurRoot effect, enabled by default

Pipeline

$backBuffer → Downsample (40%) → Blur Y → Blur X → SimpleBlend($backBuffer, blurred, #screenBlurMask) → $backBuffer

Shader Configuration

-- Vertical blur direction
screenBlurFX_YShader.defines = "BLUR_DIR=float2(0.0,1.0)"

-- Horizontal blur direction
screenBlurFX_XShader.defines = "BLUR_DIR=float2(1.0,0.0)"

Blend Pass Textures

-- The final blend reads 3 textures:
simpleBlendShader:setField("texture", 0, "$backBuffer")      -- Original
simpleBlendShader:setField("texture", 1, "$inTex")           -- Blurred result
simpleBlendShader:setField("texture", 2, "#screenBlurMask")  -- Mask (white=blur)

Notes

  • Uses PostEffectMaskedBlur class (not standard PostEffect)
  • Renders after OverlayRender bin
  • The 40% target scale reduces blur cost while maintaining smooth results
  • DOF Gaussian shaders are reused for the blur passes
  • The mask texture #screenBlurMask controls per-pixel blur intensity

See Also

  • PostFx Glow - Bloom/glow blur pipeline
  • PostFx SSAO - Screen-space ambient occlusion with blur

Advanced Lighting - Light Visualization

Debug visualization post effects for the Advanced Lighting deferred rendering pipeline: depth, normals, light color, light specular, and annotation buffers.

Motion Blur PostFX

Camera-based motion blur post-processing effect using velocity from the prepass buffer.

On this page

OverviewScene ObjectsPipelineShader ConfigurationBlend Pass TexturesNotesSee Also