]> git.sesse.net Git - movit/blob - dither_effect.frag
Add an implementation of RPDF dither on the final output.
[movit] / dither_effect.frag
1 uniform sampler2D PREFIX(dither_tex);
2
3 vec4 FUNCNAME(vec2 tc) {
4         // We also choose to dither alpha, just in case.
5         // Maybe it should in theory have a separate dither,
6         // but I doubt it matters much. We currently don't
7         // really handle alpha in any case.
8         return INPUT(tc) + texture2D(PREFIX(dither_tex), tc).xxxx;
9 }