Dithered distance fade for camera occluders
In your harnessGodot shaderMIT
Fade an opaque mesh without transparency sorting: pixels are discarded against a 4 x 4 Bayer threshold pattern as the object comes close to the camera or as a fade uniform drops, so walls and props in front of the camera become see-through.

What it takes and gives
- Shader type
- spatial
- Parameters
- albedo (vec4 = 0.55, 0.6, 0.68, 1), roughness (float = 0.7), fade (float = 1), near_distance (float = 1), far_distance (float = 2.6), dither_scale (float = 1), use_distance (bool = yes)
- Result
- Pillars near the camera break into a regular dot pattern you can see through, solid further away.
- Renderers
- compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
- Placement
- res://baltor/godot_shaders/screen_door_fade/
Limits. The pattern is visible as a grid at low resolutions and flickers with temporal anti-aliasing off; with TAA or FSR it smooths out. Shadows use the shadow camera's distance, not the main camera's, so a faded object can still cast a full shadow.
Details
- Kind
- Godot shader
- Engine
- Godot 4.3 or later
- Files
- 11 files, 57.3 KB
- Licence
- MIT
- Declared effects
- reads files, runs commands
- Checked with
- Godot 4.7.2, opengl3 compatibility (Mesa llvmpipe, Xvfb)
- Checks
- contract static, engine run, engine log clean, shader in scene, capture written, render not uniform, shader changes pixels
- Techniques
- Ordered dithering with a 4 x 4 Bayer matrix, Alpha-tested screen-door transparency, Camera distance fade
- Tags
- godot shader, spatial, dither, screen door, fade, occlusion, bayer
- Identity
library.supply.creative_originals.53db005ac36799549fe0a7ea.e47d092fa78ce4cc- Version
e47d092fa78ce4cc924b6ad7d02d0d34537176d4ccb65c7a1829e797145159b3
The version is the SHA-256 of the item your harness downloads; every file in it names its own checksum.
Something wrong with this item, its rights or its safety? Report it on the support page, or from your harness after a download.

