summaryrefslogtreecommitdiffhomepage
path: root/shaders
diff options
context:
space:
mode:
Diffstat (limited to 'shaders')
-rw-r--r--shaders/tile-shader.frag2
-rw-r--r--shaders/tile-shader.vert5
2 files changed, 5 insertions, 2 deletions
diff --git a/shaders/tile-shader.frag b/shaders/tile-shader.frag
index 790399e8..5d40df69 100644
--- a/shaders/tile-shader.frag
+++ b/shaders/tile-shader.frag
@@ -1,3 +1,5 @@
+precision highp float;
+
layout(location = 2) uniform sampler2D textureData;
layout(location = 1) uniform float y_scale;
diff --git a/shaders/tile-shader.vert b/shaders/tile-shader.vert
index 03c1f08a..6241977b 100644
--- a/shaders/tile-shader.vert
+++ b/shaders/tile-shader.vert
@@ -3,6 +3,7 @@ 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;
@@ -11,7 +12,7 @@ void main() {
interpolatedTextureCoordinates = textureCoordinates;
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);
+ 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;
}