X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=dither_effect.frag;h=b12ecd7cedfd267d8a9935a2372303c9f62e3be9;hp=6994e8467f0c9645e47d9f74ff96700028eafddf;hb=6eb973fe828e253f84e7db67f932d8860096c077;hpb=88ee2edc41d536c7057424df185fc6b49f993896 diff --git a/dither_effect.frag b/dither_effect.frag index 6994e84..b12ecd7 100644 --- a/dither_effect.frag +++ b/dither_effect.frag @@ -1,6 +1,7 @@ -uniform sampler2D PREFIX(dither_tex); -uniform vec2 PREFIX(tc_scale); -uniform float PREFIX(round_fac), PREFIX(inv_round_fac); +// Implicit uniforms: +// uniform sampler2D PREFIX(dither_tex); +// uniform vec2 PREFIX(tc_scale); +// uniform float PREFIX(round_fac), PREFIX(inv_round_fac); vec4 FUNCNAME(vec2 tc) { vec4 result = INPUT(tc); @@ -9,7 +10,7 @@ vec4 FUNCNAME(vec2 tc) { // and if there's any inaccuracy earlier in the chain so that it becomes e.g. // 254.8, it's better to just get it rounded off than to dither and have it // possibly get down to 254. This is not the case for the color components. - result.rgb += texture2D(PREFIX(dither_tex), tc * PREFIX(tc_scale)).xxx; + result.rgb += tex2D(PREFIX(dither_tex), tc * PREFIX(tc_scale)).xxx; // NEED_EXPLICIT_ROUND will be #defined to 1 if the GPU has inaccurate // fp32 -> int8 framebuffer rounding, and 0 otherwise.