diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-02-23 13:25:39 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-02-23 13:25:39 +0100 |
commit | eeedd2061bee36f49ea20e898e8edf3676bd15b5 (patch) | |
tree | 4e22a3d50d6f97992aa3b46d00b276ddac928e6a /shaders/tile-shader.vert | |
parent | 920aa82a3a05402cc0489a8d9e0b9b2f4a4e3117 (diff) |
flush
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; } |