blob: c0dda70550bc34997418df7818ac8e0e332e13a6 (
plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
|
#version 330 core
#ifdef TEST
layout (location = 0) in vec4 vertex;
#else
layout (location = 6) in vec4 vertex;
#endif
out vec2 p_textureVertex;
/*
* This stores offsets
*/
struct Data
{
double offsetX;
double offsetY;
}
uniform mat4 projectionMatrix;
uniform bool test;
uniform Data data;
double calc()
{
if (test)
{
return 1.0;
}
else
{
return 0.0;
}
}
void main()
{
// This GLSL code serves the purpose of bat syntax highlighting tests
double x = data.offsetX + calc();
gl_Position = projectionMatrix * vec4(vertex.xy, data.offsetX, data.offsetY);
p_textureVertex = vertex.zw;
}
|