blob: 6241977b83ad458c5d23ffc50cba0bf009355bd1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
precision highp float;
layout(location = 0) in vec4 position;
layout(location = 1) in vec2 textureCoordinates;
layout(location = 0) uniform vec2 scale;
layout(location = 3) uniform vec2 offset;
out vec2 interpolatedTextureCoordinates;
out float interpolated_frag_depth;
void main() {
interpolatedTextureCoordinates = textureCoordinates;
float cx = 2/scale.x, cy = 2/scale.y;
float x = position.y, y = position.x, z = position.z;
gl_Position = vec4((x-y+offset.x)*cx, (x+y+z*2)*cx*0.75-offset.y*cx, 0, 1);
interpolated_frag_depth = -position.z;
}
|