
attribute vec2 pos;
attribute vec2 base_uv;
attribute float scanline_y;

varying float scanline_out;
varying mediump vec2 texcoord;
varying mediump vec4 texsize;
varying mediump vec4 prescale;

uniform mediump float width, height;
uniform mediump float texture_width;
uniform mediump vec2 bilinear_prescale;

void main()
{
	gl_Position = vec4(pos, 0.75, 1.0);
	texcoord = base_uv * vec2(width, -height) + vec2(width, height);
	scanline_out = scanline_y;

	/* Texture height is hard coded at 512 in blastretro/blastem */
	texsize = vec4(texture_width, 512.0, 1.0 / texture_width, 1.0 / 512.0);
	prescale = vec4(bilinear_prescale, 1.0 / bilinear_prescale);
}
