Posterize in perceptual steps
In your harnessGodot shaderMIT
Reduce the image to a few flat tone levels per channel or on luminance only, quantizing after a gamma curve so steps are evenly spaced to the eye, with a hard or slightly softened step edge.

What it takes and gives
- Shader type
- spatial
- Render modes
- unshaded, cull_disabled, depth_test_disabled, depth_draw_never, skip_vertex_transform, fog_disabled
- Parameters
- screen_texture (sampler2D), levels (int = 5), gamma (float = 1), luminance_only (bool = no), edge_softness (float = 0), saturation (float = 1.15)
- Use it on
- A MeshInstance3D with a 2 x 2 QuadMesh,
material.tresas its material override and a large extra cull margin, as indemo.tscn. - Result
- The scene flattened into five crisp tone steps per channel with slightly boosted saturation.
- Renderers
- compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
- Placement
- res://baltor/godot_shaders/post_posterize_gamma/
Limits. Smooth gradients such as the sky turn into visible bands by design. Per-channel quantizing can shift hues in dark areas. The pass reads Godot's screen texture after opaque geometry, so transparent objects drawn after it are not processed and its order among other transparent passes is not controlled.
Details
- Kind
- Godot shader
- Engine
- Godot 4.3 or later
- Files
- 11 files, 53.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
- Gamma-biased quantization, Luminance-only posterization by rescaling
- Tags
- godot shader, spatial, post-process, posterize, quantize, stylized, comic, full-screen
- Identity
library.supply.creative_originals.ab799cfaa9f8dc1c00c52294.0cba3b4ef8098628- Version
0cba3b4ef8098628600c8b6a06189400755428af5c27e587a765fdcf892301aa
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.
