Kuwahara painterly filter
In your harnessGodot shaderMIT
Turn the rendered scene into a painting: for each pixel, four overlapping square regions are compared and the mean colour of the region with the least variance wins, which flattens areas into strokes while keeping edges.

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), radius (int = 4), sample_spacing (float = 1), saturation (float = 1.2)
- 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 smoothed into flat painterly patches with crisp boundaries between objects.
- Renderers
- compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
- Placement
- res://baltor/godot_shaders/post_kuwahara_painterly/
Limits. Cost is (2r + 1) squared samples per pixel: radius 4 reads 81 samples, radius 8 reads 289, which is heavy at high resolution. Square regions produce blocky artefacts at large radii (anisotropic variants avoid them). 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, 63.5 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
- Kuwahara filter (four-quadrant minimum variance mean, Kuwahara et al. 1976)
- Tags
- godot shader, spatial, post-process, kuwahara, painterly, oil painting, filter, full-screen
- Identity
library.supply.creative_originals.e675e75e6ad164df991ed6b4.1d35496f42007e50- Version
1d35496f42007e508cfa301b2ba95c1d035292ad171b2b1379d19858df323ed8
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.
