diff options
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; +} |
