diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2025-01-23 21:57:31 -0500 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2025-01-23 21:57:31 -0500 |
| commit | e93eb289ca44e98967482ab80fd5329f85ccd03e (patch) | |
| tree | 4164b6d5b9ac2e40d18ec3eea52730c9f9606ccb /assets/shaders/glyph.vert | |
| parent | 846a6e1185417ee3e187edc06ef327d180bf0d9b (diff) | |
pke: first-pass 2d overlay render pass scaffolding
Diffstat (limited to 'assets/shaders/glyph.vert')
| -rw-r--r-- | assets/shaders/glyph.vert | 32 |
1 files changed, 32 insertions, 0 deletions
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; +} |
