Ok just a quick update, I've noticed that as they are set sometimes the scanlines don't correspond 1:1 with the pixel resolution of the snaps. For the CGWG shader there are a lot of "resolution" parameter I can't get to grips with, but what's sure is that in the vertex shader there's a division by 200, so all snaps have 200 scanlines. I think you can pass the texture_height to that shader to fix this.
On the other hand I've found how to fix Lotte shaders with this respect. Notice that your layout file has this lines:
video.shader.set_param("color_texture_sz", vidSurf.width/4, vidSurf.height/4);
video.shader.set_param("color_texture_pow2_sz", vidSurf.width/4, vidSurf.height/4);
To make it work better I changed the first line so that it passes actual texture size to the shader, and also added support for vertical scanlines using the "vert" parameter. I didn't care to calculate the power of 2 texture for the other field, but it seems to work well anyway. Substitute the two lines with these:
video.shader.set_param("vert", (video.texture_width > video.texture_height ? 0.0 : 1.0));
video.shader.set_param("color_texture_sz", video.texture_width, video.texture_height);
video.shader.set_param("color_texture_pow2_sz", video.texture_width, video.texture_height);
In this way you'll get correct scanlines that are exactly the same number as the vertical resolution, while aperture mask will be calculated as always at full resolution.