What this component contains
ATTRIBUTION.mdLICENSEREADME.mdcomponent.jsondemo.tscninspect_shader.pymaterial.trespost_pixelate_palette.gdshaderpreview.pngtest_package.pyverification/native.json
How it works
- Shader type
- spatial
- Render modes
- unshaded, cull_disabled, depth_test_disabled, depth_draw_never, skip_vertex_transform, fog_disabled
- Parameters
- screen_texture (sampler2D), palette (sampler2D), palette_size (int = 8), pixel_size (float = 4), dither_strength (float = 0.35), palette_mix (float = 1)
- Use it on
- A MeshInstance3D with a 2 x 2 QuadMesh, `material.tres` as its material override and a large extra cull margin, as in `demo.tscn`., Optional: a palette image (N colours side by side) for `palette`.
- Result
- The scene as chunky 4-pixel blocks reduced to an eight-colour retro palette.
- Renderers
- compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
- Placement
- res://baltor/godot_shaders/post_pixelate_palette/
Recorded checks
godot 4.7.2.stable.official.ed1daf0bf
contract_staticengine_runengine_log_cleanshader_in_scenecapture_writtenrender_not_uniformshader_changes_pixels
Limits to consider
Blocks sample one point, so thin details can vanish between frames as the camera moves. Palette matching is a weighted RGB distance, not a perceptual colour space. Cost grows with `palette_size`. 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.