I need to implement a glsl bilinear filter (I can't use GL_LINEAR because i am doing YUY2 ->RGB convert, so I have set this to GL_NEAREST). I have a classic bilinear filtering like this :


voidmain(void)
{
vec2f=fract(texcoord.st*vec2(width,height));
vec4t00=yuv2rgb(texcoord.st);
vec4t10=yuv2rgb(texcoord.st+vec2(1.0/width,0.0));
vec4tA=mix(t00,t10,f.x);
vec4t01=yuv2rgb(texcoord.st+vec2(0.0,1.0/height));
vec4t11=yuv2rgb(texcoord.st+vec2(1.0/width,1.0/height));
vec4tB=mix(t01,t11,f.x);
gl_FragColor=mix(tA,tB,f.y);
}where width and height are the size of the texture. I am trying to do that on Windows with Amd graphic card.If I move the textured quad, scale the textured scale .. I see at the some changing location an artifact (horizontal or vertical lines).it seems my shader is very classical .. I don't know what I can do to avoid theses artifacts.