diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2023-03-12 16:07:41 +0100 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2023-03-12 16:07:41 +0100 |
| commit | 4740f6b8efc014cbf7a4354ec33c8c29894762b6 (patch) | |
| tree | 997d4ec7d2fe2c2f2506a2d5343babce7e930581 /shaders | |
| parent | a87ad2eac867b77a75e05ad48bb3ee622e5735d3 (diff) | |
Fix some compilation warnings + release build
Fix element by element copy of imgui vertices
Diffstat (limited to 'shaders')
| -rw-r--r-- | shaders/api-test-ui.vert | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/shaders/api-test-ui.vert b/shaders/api-test-ui.vert index 92c1372..4824d23 100644 --- a/shaders/api-test-ui.vert +++ b/shaders/api-test-ui.vert @@ -1,10 +1,11 @@ #extension GL_EXT_buffer_reference : require
struct vertex {
- vec2 pos;
- vec2 uv;
+ float pos_x;
+ float pos_y;
+ float uv_x;
+ float uv_y;
uint color;
- uint padding;
};
layout(buffer_reference) readonly buffer vertices {
@@ -32,7 +33,8 @@ void main() { vertex v = params.vertex_buffer.vertices[gl_VertexIndex];
Out.color = unpackUnorm4x8(v.color);
- Out.uv = v.uv;
+ Out.uv = vec2(v.uv_x, v.uv_y);
- gl_Position = vec4(v.pos * params.scale + params.translate, 0.0, 1.0);
+ vec2 pos = vec2(v.pos_x, v.pos_y);
+ gl_Position = vec4(pos * params.scale + params.translate, 0.0, 1.0);
}
|
