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

21 lines
463 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) {
2020-03-07 14:16:51 +00:00
lowp float dither_phase = 0.0;
2020-03-07 03:36:05 +00:00
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;
2020-03-07 14:16:51 +00:00
if (dither_phase == 0.0 || dither_phase == 10.0) {
2020-03-07 03:36:05 +00:00
dither = 0.0;
}
gl_FragColor = vec4 (vec3 (20.0, 12.0, 28.0) / vec3 (255.0), dither);
}