aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorladevieq <qladevie@wanadev.fr>2021-03-05 13:45:15 +0100
committerladevieq <qladevie@wanadev.fr>2021-03-05 13:45:15 +0100
commit6c1c9d47b4d46b6fa107474e0802647c0463fe74 (patch)
tree4862e2201a0f3835b13198bd7cad5409d57d7b6e
parent7887cb560a4efd80f9124d32ec177913c80259a1 (diff)
Convert color properly to vec4
-rw-r--r--shaders/ui.vert5
1 files changed, 3 insertions, 2 deletions
diff --git a/shaders/ui.vert b/shaders/ui.vert
index cc1091c..36d3144 100644
--- a/shaders/ui.vert
+++ b/shaders/ui.vert
@@ -1,7 +1,8 @@
struct Vertex {
vec2 pos;
vec2 uv;
- vec4 color;
+ uint color;
+ uint padding;
};
layout(set = 0, binding = 0) uniform Vertices {
@@ -20,7 +21,7 @@ layout(location = 0) out struct {
void main() {
Vertex v = vertices[gl_VertexIndex];
- Out.color = v.color;
+ Out.color = unpackUnorm4x8(v.color);
Out.uv = v.uv;
gl_Position = vec4(v.pos, 0.0, 1.0);