OXYGENHUB
◆ main openmsx / share / shaders / simple.vert
566 B · last changed chore(): initial commit 1 month ago source blame history raw
e8555c89 Andy McCall 1
uniform mat4 u_mvpMatrix;
2
uniform vec3 texSize;
3
uniform vec3 texStepX; // = vec3(vec2(1.0 / texSize.x), 0.0);
4
uniform vec4 cnst;     // = vec4(scan_a, scan_b, scan_c, alpha);
5
6
attribute vec4 a_position;
7
attribute vec3 a_texCoord;
8
9
varying vec2 scaled;
10
varying vec3 misc;
11
varying vec2 videoCoord;
12
13
void main()
14
{
15
	float alpha  = cnst.w;
16
17
	gl_Position = u_mvpMatrix * a_position;
18
	misc = vec3((vec2(0.5) - vec2(1.0, 0.0) * alpha) * texStepX.x, a_texCoord.y);
19
	scaled = a_texCoord.xy * texSize.xy + vec2(0.0, 0.5);
20
21
#if SUPERIMPOSE
22
	videoCoord = a_texCoord.xz;
23
#endif
24
}