Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

Bayer Dithering Shader

An asset by n0cturne
The page banner background of a mountain and forest
Bayer Dithering Shader hero image

Quick Information

0 ratings
Bayer Dithering Shader icon image
n0cturne
Bayer Dithering Shader

This Godot shader applies a dithering effect to a texture using Bayer matrix dithering. Download bayer_mat_dither.gdshader from the repository and add the shader to your material. You can also download the project files here to test out the shader.Made for Godot 4.4+

Supported Engine Version
4.4
Version String
1.0
License Version
CC-BY-4.0
Support Level
community
Modified Date
6 days ago
Git URL
Issue URL

Bayer-Dithering-Shader

This Godot shader applies a dithering effect to a texture using Bayer matrix dithering. Download bayer_mat_dither.gdshader and add the shader to your material. You can also download the project files here to test out the shader.

Made with Godot 4.4

Parameters

int dither_type - The type of dithering to apply to the texture. The 3 types of dithering are 'Flat', 'Gradient', and 'Point'.

bool invert - When set to true, the dithering effect inverts.

int matrix_size - The size of the matrix to apply dithering with. The available sizes are 2, 4, and 8. Lower matrix sizes give the dithering effect more contrast while higher sizes are smoother.

2x2 matrix:

README 2x2

4x4 matrix:

README 4x4

8x8 matrix:

README 8x8

bool debug - Switches on debug mode. Use only for in editor testing. Debug mode will display a red pixel where your point is in the texture when using Point dithering and place red dots on the two gradient points in Gradient dithering.

Flat Dithering

Flat Dithering applies a flat level of dithering to the entire texture.

README GIF of flat dithering

float flat_dither_level - The flat level of dithering to apply to the texture. Ranges between 0.0 and 1.0.

Gradient Dithering

Gradient Dithering creates a dithering gradient between two points.

README GIF of gradient dithering

vec2 gradient_point_opaque - The world point of the opaque end of the gradient.

vec2 gradient_point_trans - The world point of the transparent end of the gradient.

Point Dithering

Point Dithering applies a dithering effect to a single point and extends outward.

README GIF of point dithering

vec2 dither_point - The world point to apply the dithering effect.

float dither_point_radius - The radius in pixels of the dithering effect.

Crediting

You are free to use this shader for commercial and non-commercial projects. Please attribute credit to n0cture or N0cturneDev. Links to the repository are appreciated.

This Godot shader applies a dithering effect to a texture using Bayer matrix dithering. Download bayer_mat_dither.gdshader from the repository and add the shader to your material. You can also download the project files here to test out the shader.

Made for Godot 4.4+

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Bayer Dithering Shader icon image
n0cturne
Bayer Dithering Shader

This Godot shader applies a dithering effect to a texture using Bayer matrix dithering. Download bayer_mat_dither.gdshader from the repository and add the shader to your material. You can also download the project files here to test out the shader.Made for Godot 4.4+

Supported Engine Version
4.4
Version String
1.0
License Version
CC-BY-4.0
Support Level
community
Modified Date
6 days ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers