diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2025-02-28 22:33:58 -0500 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2025-02-28 22:33:58 -0500 |
| commit | 37347bf7811a5fa42c98e2a19adfee15252ee479 (patch) | |
| tree | 70fe178ad777f52404f51b90c06b8d14ef101276 /assets/shaders/ui-base.vert | |
| parent | 85bbecbdebf4f096418aea1cd4f9616f9d97e451 (diff) | |
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).
Diffstat (limited to 'assets/shaders/ui-base.vert')
| -rw-r--r-- | assets/shaders/ui-base.vert | 30 |
1 files changed, 30 insertions, 0 deletions
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; +} |
