diff options
| author | ladevieq <qladevie@wanadev.fr> | 2021-03-05 13:45:15 +0100 |
|---|---|---|
| committer | ladevieq <qladevie@wanadev.fr> | 2021-03-05 13:45:15 +0100 |
| commit | 6c1c9d47b4d46b6fa107474e0802647c0463fe74 (patch) | |
| tree | 4862e2201a0f3835b13198bd7cad5409d57d7b6e /shaders/ui.vert | |
| parent | 7887cb560a4efd80f9124d32ec177913c80259a1 (diff) | |
Convert color properly to vec4
Diffstat (limited to 'shaders/ui.vert')
| -rw-r--r-- | shaders/ui.vert | 5 |
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);
|
