File: hq.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 (30 lines) | stat: -rw-r--r-- 590 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
25
26
27
28
29
30
uniform mat4 u_mvpMatrix;
uniform vec3 texSize;

attribute vec4 a_position;
attribute vec3 a_texCoord;

varying vec2 mid;
varying vec2 leftTop;
varying vec2 edgePos;
varying vec2 weightPos;
varying vec2 texStep2; // could be uniform
varying vec2 videoCoord;

void main()
{
	gl_Position = u_mvpMatrix * a_position;

	vec2 texStep = 1.0 / texSize.xy;
	mid     = a_texCoord.xy;
	leftTop = a_texCoord.xy - texStep;

	edgePos = a_texCoord.xy * vec2(1.0, 2.0);
	weightPos = edgePos * texSize.xy * vec2(1.0, 0.5);

	texStep2 = 2.0 * texStep;

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