From 440808a5ad98bdcd4024a2e0f552d83dfa21c5d2 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 11 Jun 2022 23:35:30 +0200 Subject: a --- shaders/tile-shader.vert | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'shaders') diff --git a/shaders/tile-shader.vert b/shaders/tile-shader.vert index a7e9e660..03c1f08a 100644 --- a/shaders/tile-shader.vert +++ b/shaders/tile-shader.vert @@ -2,8 +2,7 @@ precision highp float; layout(location = 0) in vec4 position; layout(location = 1) in vec2 textureCoordinates; -layout(location = 0) uniform vec2 projection; -layout(location = 1) uniform float y_scale; +layout(location = 0) uniform vec2 scale; out vec2 interpolatedTextureCoordinates; out float interpolated_frag_depth; @@ -11,8 +10,8 @@ out float interpolated_frag_depth; void main() { interpolatedTextureCoordinates = textureCoordinates; - float cx = 2/projection.x, cy = 2/projection.y; - float x = position.x, y = position.y, z = position.z*y_scale; - gl_Position = vec4((x-y)*cx, (x+y+z*2)*cx, 0, 1); + float cx = 2/scale.x, cy = 2/scale.y; + float x = position.x, y = position.y, z = position.z; + gl_Position = vec4((x-y)*cx, (x+y+z*2)*cx*0.75, 0, 1); interpolated_frag_depth = -position.z; } -- cgit v1.2.3