summaryrefslogtreecommitdiffhomepage
path: root/shaders
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-06-11 23:35:30 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-06-11 23:35:30 +0200
commit440808a5ad98bdcd4024a2e0f552d83dfa21c5d2 (patch)
tree193622e8249ad9cd02c79a66c4cd04be3a0d48b0 /shaders
parentda042f527536ba2ba82e5aa823e4fd132afebe1e (diff)
a
Diffstat (limited to 'shaders')
-rw-r--r--shaders/tile-shader.vert9
1 files changed, 4 insertions, 5 deletions
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;
}