aboutsummaryrefslogtreecommitdiffstats
path: root/shaders
diff options
context:
space:
mode:
Diffstat (limited to 'shaders')
-rw-r--r--shaders/ui.frag2
-rw-r--r--shaders/ui.vert7
2 files changed, 6 insertions, 3 deletions
diff --git a/shaders/ui.frag b/shaders/ui.frag
index c9f0339..78833d1 100644
--- a/shaders/ui.frag
+++ b/shaders/ui.frag
@@ -5,7 +5,7 @@ layout(location = 0) in struct {
vec4 color;
} In;
-layout(set = 0, binding = 1) uniform sampler2D atlas;
+layout(set = 0, binding = 2) uniform sampler2D atlas;
void main() {
o_Color = In.color * texture(atlas, In.uv.xy);
diff --git a/shaders/ui.vert b/shaders/ui.vert
index 2e6862d..c935357 100644
--- a/shaders/ui.vert
+++ b/shaders/ui.vert
@@ -8,6 +8,11 @@ layout(set = 0, binding = 0) uniform Vertices {
Vertex vertices[158];
};
+layout(set = 0, binding = 1) uniform UiTransforms {
+ vec2 scale;
+ vec2 translate;
+};
+
out gl_PerVertex {
vec4 gl_Position;
};
@@ -17,8 +22,6 @@ layout(location = 0) out struct {
vec4 color;
} Out;
-const vec2 scale = vec2(2.0 / 384.0, 2.0 / 186.0);
-const vec2 translate = vec2(-1.0, -1.0);
void main() {
Vertex v = vertices[gl_VertexIndex];