2D dithering shaders for Godot 4
A small collection of ordered dithering 2D shaders for Godot 4, based on Surma's article on Ditherpunk. Two-colored palettes are supported.
Bayer Level 0 (Inverted) |
Bayer Level 0 (Normal) |
Bayer Level 0 (No sRGB to RGB conversion) |
|
|
|
Bayer Level 1 (Inverted) |
Bayer Level 1 (Normal) |
Bayer Level 1 (No sRGB to RGB conversion) |
|
|
|
Bayer Level 2 (Inverted) |
Bayer Level 2 (Normal) |
Bayer Level 2 (No sRGB to RGB conversion) |
|
|
|
Bayer Level 3 (Inverted) |
Bayer Level 3 (Normal) |
Bayer Level 3 (No sRGB to RGB conversion) |
|
|
|
Blue Noise |
Blue Noise |
Blue Noise (No sRGB to RGB conversion) |
|
|
|
- Add the "materials" folder to your Godot project.
- Drag and drop the desired material onto a Sprite node.
- Add the "materials" folder to your Godot project.
- Add a SubViewport node to the scene.
- Add a Camera3D node as a child of the SubViewport node.
- Add a SubViewportContainer node to the scene.
- Add another SubViewport node as a child of the SubViewportContainer node.
- Add a TextureRect node as a child of the second SubViewport node.
- In the Texture property of the TextureRect node, select "New ViewportTexture" and choose the SubViewport node that contains the Camera3D.
- Drag and drop the desired material onto the CanvasItem section of the TextureRect node.
- The scene tree should have the following structure:
Node3D
[...]
SubViewport
Camera3D
SubViewportContainer
SubViewport2
TextureRect
[...]
The test images come from Surma's article on Ditherpunk and Wikimedia. The blue noise textures are from Christoph Peter's article on the topic.