diff options
Diffstat (limited to 'shaders/tile-shader.vert')
-rw-r--r-- | shaders/tile-shader.vert | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/shaders/tile-shader.vert b/shaders/tile-shader.vert index 7a5bd1c3..cc90bae5 100644 --- a/shaders/tile-shader.vert +++ b/shaders/tile-shader.vert @@ -2,12 +2,15 @@ precision highp float; layout(location = 0) in vec4 position; layout(location = 1) in vec2 textureCoordinates; -uniform mat4 projection; +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 * position; + gl_Position = projection * vec4(position.xy, 0, position.w) + vec4(0, position.z * y_scale, 0, 0); + interpolated_frag_depth = position.z; } |