summaryrefslogtreecommitdiffhomepage
path: root/shaders/tile-shader.vert
diff options
context:
space:
mode:
Diffstat (limited to 'shaders/tile-shader.vert')
-rw-r--r--shaders/tile-shader.vert15
1 files changed, 10 insertions, 5 deletions
diff --git a/shaders/tile-shader.vert b/shaders/tile-shader.vert
index 239f4b07..6c12f1e2 100644
--- a/shaders/tile-shader.vert
+++ b/shaders/tile-shader.vert
@@ -1,14 +1,19 @@
+#version 450
precision highp float;
+layout (location = 0) uniform vec2 scale;
+layout (location = 1) uniform vec2 offset;
+
layout(location = 0) in vec4 position;
-layout(location = 1) in vec2 textureCoordinates;
-layout(location = 0) uniform vec2 scale;
-layout(location = 3) uniform vec2 offset;
+layout(location = 1) in vec2 texcoord;
+layout(location = 2) flat in uint sampler_id;
-out vec2 interpolatedTextureCoordinates;
+layout (location = 0) out vec2 out_texcoord;
+layout (location = 1) flat out uint out_sampler_id;
void main() {
- interpolatedTextureCoordinates = textureCoordinates;
+ interpolatedTextureCoordinates = texcoord;
+ out_sampler_id = sampler_id;
float cx = 2/scale.x, cy = 2/scale.y;
float x = position.y, y = position.x, z = position.z;