Radial chromatic aberration
In your harnessGodot shaderMIT
Split the red, green and blue channels radially so colour fringes grow toward the screen edges like a cheap lens, with several samples per channel to smear the fringe instead of doubling it.

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), strength (float = 0.012), falloff_power (float = 2), samples (int = 6), center_x (float = 0.5), center_y (float = 0.5)
- 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 with red and blue fringes along edges that widen toward the corners.
- Renderers
- compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
- Placement
- res://baltor/godot_shaders/post_chromatic_aberration/
Limits. Three channels only, so the fringe is red and blue rather than a full spectrum. Edges of the screen clamp the samples. 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, 61.7 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
- Radial per-channel UV offset, Multi-sample averaging along the offset
- Tags
- godot shader, spatial, post-process, chromatic aberration, lens, fringe, camera, full-screen
- Identity
library.supply.creative_originals.2e8e02173997401c6b61f886.0b77f20063d7fddd- Version
0b77f20063d7fddd9457252d1038ff4bafc6a140e9023b48c548eaa0c9449226
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.
