I think this shader illustrates the problem well, and makes it clear that the texture coordinates are computed slightly differently for the two triangles:
uniform sampler2D mpass_texture;
uniform sampler2D color_texture;
uniform vec2 color_texture_pow2_sz;
void main()
{
vec2 xy = gl_TexCoord[0].st;
vec2 uv_ratio = fract(xy*color_texture_pow2_sz);
gl_FragColor = vec4(uv_ratio.x, uv_ratio.y, 0.0, 0.0);
}
The details vary with window size, but here is a representative output (here using -gl_forcepow2texture):
![[Linked Image from img691.imageshack.us]](http://img691.imageshack.us/img691/135/shadertestx.png)
On another note, I've encountered a couple issues with "screen bitmap" shaders. First, I find that I need to have two "mame bitmap" shaders, i.e.
mame -glsl_shader_mame0 shader/glsl_plain -glsl_shader_mame1 shader/glsl_plain -glsl_shader_screen0 shader/custom/glsl_add_screenbm_hscanlines
With just one, I get the following error repeated many times, and the game image appears tiny at the corner of the screen:
src/osd/sdl/drawogl.c:2907: GL Error: 1283 0x503
Second, when I do get a "screen bitmap" shader working, I suffer a huge memory leak (but not if I use 0.136).