OXYGENHUB
◆ main openmsx / share / shaders / scale2x.vert
487 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
4
attribute vec4 a_position;
5
attribute vec3 a_texCoord;
6
7
varying vec2 texStep; // could be uniform
8
varying vec2 coord2pi;
9
varying vec2 texCoord;
10
varying vec2 videoCoord;
11
12
const float pi = 3.1415927;
13
const float pi2 = 2.0 * pi;
14
15
void main()
16
{
17
	gl_Position = u_mvpMatrix * a_position;
18
	texCoord = a_texCoord.xy;
19
	coord2pi = a_texCoord.xy * texSize.xy * pi2;
20
	texStep = 1.0 / texSize.xy;
21
22
#if SUPERIMPOSE
23
	videoCoord = a_texCoord.xz;
24
#endif
25
}