From 4740f6b8efc014cbf7a4354ec33c8c29894762b6 Mon Sep 17 00:00:00 2001 From: ladevieq Date: Sun, 12 Mar 2023 16:07:41 +0100 Subject: Fix some compilation warnings + release build Fix element by element copy of imgui vertices --- shaders/api-test-ui.vert | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'shaders') 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); } -- cgit v1.3