X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=dither_effect.frag;fp=dither_effect.frag;h=9b39553099e314c940fb1401649517346910c6e1;hp=0000000000000000000000000000000000000000;hb=ff9e68a3f5abb179bd7bf9fb84df48327f148583;hpb=3a1e190a989a29edffdfa79bad7994149fc5d27c diff --git a/dither_effect.frag b/dither_effect.frag new file mode 100644 index 0000000..9b39553 --- /dev/null +++ b/dither_effect.frag @@ -0,0 +1,9 @@ +uniform sampler2D PREFIX(dither_tex); + +vec4 FUNCNAME(vec2 tc) { + // We also choose to dither alpha, just in case. + // Maybe it should in theory have a separate dither, + // but I doubt it matters much. We currently don't + // really handle alpha in any case. + return INPUT(tc) + texture2D(PREFIX(dither_tex), tc).xxxx; +}