This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Based on http://devlog-martinsh.blogspot.com/2011/03/glsl-dithering.html | |
shader_type canvas_item; | |
uniform float scale = 1.0; | |
float find_closest(int x, int y, float c0) | |
{ | |
mat4 dither = mat4(vec4( 1.0, 33.0, 9.0, 41.0), | |
vec4(49.0, 17.0, 57.0, 25.0), |