From 37347bf7811a5fa42c98e2a19adfee15252ee479 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Fri, 28 Feb 2025 22:33:58 -0500 Subject: pke: checkpoint: vk renames + first-pass ui Renamed pipeline and descriptor names to be more self-descriptive. UI work is not done, and will not record. Needs vulkan items created (buffers). --- assets/shaders/ui-base.vert | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 assets/shaders/ui-base.vert (limited to 'assets/shaders/ui-base.vert') diff --git a/assets/shaders/ui-base.vert b/assets/shaders/ui-base.vert new file mode 100644 index 0000000..458d599 --- /dev/null +++ b/assets/shaders/ui-base.vert @@ -0,0 +1,30 @@ +#version 450 + +// vertex +layout(location = 0) in vec2 in_position; +layout(location = 1) in vec2 in_uv; + +// instance +layout(location = 2) in mat4 pos_scale; +layout(location = 6) in vec2 px_scale; +layout(location = 7) in float depth; + +layout(location = 0) out vec4 out_border_color; +layout(location = 1) out vec4 out_background_color; +layout(location = 2) out vec2 out_px_scale; +layout(location = 3) out vec2 out_uv; + +out gl_PerVertex +{ + vec4 gl_Position; +}; + +void main() +{ + vec4 transformed_position = pos_scale * vec4(in_position, 0.0, 1.0); + gl_Position = vec4(transformed_position.xy, depth, 1.0); + out_border_color = vec4(0.8, 0.8, 0.8, 1.0); + out_background_color = vec4(0.2, 0.3, 0.2, 1.0); + out_px_scale = px_scale; + out_uv = in_uv; +} -- cgit v1.2.3