]> git.sesse.net Git - movit/blobdiff - padding_effect.frag
Don't dither alpha.
[movit] / padding_effect.frag
index 344b34fb4677faf419fb4c7036ec86a6a993bf53..4f1adc1fd257f54318f38a7ada6c3e296d29089f 100644 (file)
@@ -7,24 +7,10 @@ vec4 FUNCNAME(vec2 tc) {
        tc -= PREFIX(offset);
        tc *= PREFIX(scale);
 
        tc -= PREFIX(offset);
        tc *= PREFIX(scale);
 
-#if 1
        if (any(lessThan(tc, PREFIX(texcoord_min))) ||
            any(greaterThan(tc, PREFIX(texcoord_max)))) {
                return PREFIX(border_color);
        }
        if (any(lessThan(tc, PREFIX(texcoord_min))) ||
            any(greaterThan(tc, PREFIX(texcoord_max)))) {
                return PREFIX(border_color);
        }
-#endif
-       if (any(lessThan(tc, vec2(0.0))) ||
-           any(greaterThan(tc, vec2(1.0)))) {
-               return PREFIX(border_color);
-       } 
-#if 0
-       // In theory, maybe we should test on the outmost textel centers
-       // (e.g. (0.5/width, 0.5/height) for the top-left) instead of the
-       // texture border. However, since we only support integer padding
-       if (any(lessThan(tc, vec2(0.0))) || any(greaterThan(tc, vec2(1.0)))) {
-               return PREFIX(border_color);
-       }
-#endif
 
        return INPUT(tc);
 }
 
        return INPUT(tc);
 }