2021-32-bit-holiday-jam/shaders/shadow-frag.glsl

21 lines
452 B
Plaintext
Raw Normal View History

2020-03-07 03:36:05 +00:00
#define lowp
#define mediump
#define highp
#line 0
uniform lowp float uni_dither_phase;
void main (void) {
lowp float dither_phase = uni_dither_phase;
dither_phase += 4.0 * mod (gl_FragCoord.y + 0.5, 4.0);
dither_phase += mod (gl_FragCoord.x + 0.5, 4.0);
dither_phase = mod (dither_phase, 16.0);
lowp float dither = 1.0;
if (dither_phase == 0.0) {
dither = 0.0;
}
gl_FragColor = vec4 (vec3 (20.0, 12.0, 28.0) / vec3 (255.0), dither);
}