From eab26cf72c1a7a8a9e694e275b2455630606d4ab Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Mon, 14 Oct 2024 21:32:21 -0600 Subject: [PATCH] test --- client/shader_src/ui_text.vert | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/client/shader_src/ui_text.vert b/client/shader_src/ui_text.vert index 214c1da..f3ed4d9 100644 --- a/client/shader_src/ui_text.vert +++ b/client/shader_src/ui_text.vert @@ -7,10 +7,18 @@ struct Symbol { uint width; }; +struct Character { + uint code; +}; + layout(buffer_reference, std430) readonly buffer SymbolList{ Symbol symbols[]; }; +layout(buffer_reference, std430) readonly buffer CharacterList{ + Character characters[]; +}; + layout(set = 0, binding = 0) uniform UIUniform { mat4 screen; } ubo; @@ -21,6 +29,7 @@ layout(set = 1, binding = 0) uniform FontUniform { uint height; uint space_width; SymbolList symbol_list; + CharacterList characters; } font; layout(location = 0) in vec2 inVertexPosition; @@ -34,6 +43,7 @@ layout(location = 1) out vec2 fragUV; void main() { Symbol symbol = font.symbol_list.symbols[code]; + Character character = font.characters.characters[0]; float fragU = (inVertexPosition.x*symbol.width + symbol.x) / font.width; float fragV = inVertexPosition.y + symbol.top / font.height;