From e93eb289ca44e98967482ab80fd5329f85ccd03e Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Thu, 23 Jan 2025 21:57:31 -0500 Subject: pke: first-pass 2d overlay render pass scaffolding --- assets/shaders/glyph.vert | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 assets/shaders/glyph.vert (limited to 'assets/shaders/glyph.vert') diff --git a/assets/shaders/glyph.vert b/assets/shaders/glyph.vert new file mode 100644 index 0000000..52981c2 --- /dev/null +++ b/assets/shaders/glyph.vert @@ -0,0 +1,32 @@ +#version 450 + +// vertex +layout(location = 0) in vec2 in_position; +layout(location = 1) in vec2 in_uv; + +// instance +layout(location = 2) in vec4 in_fg_color; +layout(location = 3) in vec4 in_bg_color; +layout(location = 4) in vec4 in_sprite_region; +layout(location = 5) in float in_width; + +layout(location = 0) out vec4 out_fg_color; +layout(location = 1) out vec4 out_bg_color; +layout(location = 2) out vec4 out_sprite_region; +layout(location = 3) out vec2 out_uv; +layout(location = 4) out float out_width; + +out gl_PerVertex +{ + vec4 gl_Position; +}; + +void main() +{ + gl_Position = vec4(in_position, 0.0, 1.0); + out_fg_color = in_fg_color; + out_bg_color = in_bg_color; + out_sprite_region = in_sprite_region; + out_uv = in_uv; + out_width = in_width; +} -- cgit v1.2.3