Godot Dither Shader

This is a dither shader inspired by Lucas Pope’s Return of the Obra Dinn.

The shader itself is a simple post-process screen shader which will take a gradient palette and apply it with a dither effect to any scene.

You can download the demo project source from here (zip) or from Github.

If you just want to see the shader code, find that here.

For more information on how to setup and use the shader, please see the Github repository readme or the Godot Shaders page.

Links

StatusReleased
CategoryAssets
Rating
Rated 5.0 out of 5 stars
(12 total ratings)
AuthorSam Bigos
Tagsdemo, dither, flat-shading, Godot, graphics, lucas-pope, obra-dinn, post-process, Shaders

Download

Download
godot_dither_shader_v1.0_src 1.1 MB

Install instructions

Download and unzip, then import the project into Godot (tested with 3.2.3 and 3.2.4).

Comments

Log in with itch.io to leave a comment.

is there a way to customize the colors a bit more? so for example blood splatters from enemies would stay red for contarst

The screen color is retrieved here: 

vec3 screen_col = texture(TEXTURE, screen_sample_uv).rgb

After this, you could check if that color is red by some metric (ex. if red value is 4 times greater than blue/green). Then when you apply the final color step, use a red gradient texture if the screen color is red

if( <screen_col is red> )
final_col = texture(u_color_tex_reds, vec2(col_sample, 0.5)).rgb;

Something like that should work

Does anyone know how to get the dithers to work in 4.0+? They seem to just break and I'm not sure why

(+3)

Oh I found the answer in someone else's reply on the godot shader's website

To make work with Godot 4 change line 9 from

uniform sampler2D u_dither_tex; 

to

uniform sampler2D u_dither_tex : repeat_enable; 

Nice man i love you work 

poggers

Brilliant and very helpful. Thank you :

thank

Wonderful!

Beautiful!
Thank you so much!