summaryrefslogtreecommitdiffhomepage
path: root/shaders/tile-shader.vert
blob: cc90bae58798c72e277c0aee0a7a5b6cec31dba5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
precision highp float;

layout(location = 0) in vec4 position;
layout(location = 1) in vec2 textureCoordinates;
layout(location = 0) uniform mat4 projection;
layout(location = 1) uniform float y_scale;

out vec2 interpolatedTextureCoordinates;
out float interpolated_frag_depth;

void main() {
    interpolatedTextureCoordinates = textureCoordinates;

    gl_Position = projection * vec4(position.xy, 0, position.w) + vec4(0, position.z * y_scale, 0, 0);
    interpolated_frag_depth = position.z;
}