File: simple.vert

package info (click to toggle)
openmsx 20.0%2Bdfsg-1.2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 27,544 kB
  • sloc: cpp: 236,922; xml: 49,948; tcl: 15,056; python: 5,385; perl: 281; sh: 77; makefile: 53
file content (24 lines) | stat: -rw-r--r-- 566 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
uniform mat4 u_mvpMatrix;
uniform vec3 texSize;
uniform vec3 texStepX; // = vec3(vec2(1.0 / texSize.x), 0.0);
uniform vec4 cnst;     // = vec4(scan_a, scan_b, scan_c, alpha);

attribute vec4 a_position;
attribute vec3 a_texCoord;

varying vec2 scaled;
varying vec3 misc;
varying vec2 videoCoord;

void main()
{
	float alpha  = cnst.w;

	gl_Position = u_mvpMatrix * a_position;
	misc = vec3((vec2(0.5) - vec2(1.0, 0.0) * alpha) * texStepX.x, a_texCoord.y);
	scaled = a_texCoord.xy * texSize.xy + vec2(0.0, 0.5);

#if SUPERIMPOSE
	videoCoord = a_texCoord.xz;
#endif
}