OXYGENHUB
◆ main openmsx / share / shaders / hq.vert
604 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 vec2 edgePosScale;
4
5
attribute vec4 a_position;
6
attribute vec3 a_texCoord;
7
8
varying vec2 mid;
9
varying vec2 leftTop;
10
varying vec2 edgePos;
11
varying vec2 weightPos;
12
varying vec2 texStep2; // could be uniform
13
varying vec2 videoCoord;
14
15
void main()
16
{
17
	gl_Position = u_mvpMatrix * a_position;
18
19
	vec2 texStep = 1.0 / texSize.xy;
20
	mid     = a_texCoord.xy;
21
	leftTop = a_texCoord.xy - texStep;
22
23
	edgePos = a_texCoord.xy * edgePosScale;
24
	weightPos = a_texCoord.xy * texSize.xy;
25
26
	texStep2 = 2.0 * texStep;
27
28
#if SUPERIMPOSE
29
	videoCoord = a_texCoord.xz;
30
#endif
31
}