From 5887b2a2a84fdd54d9eb29af4e4c619958d6f414 Mon Sep 17 00:00:00 2001 From: Serkyo Date: Sun, 10 May 2026 22:00:40 +0200 Subject: [PATCH] feat(assets): add cube vertex and fragment shaders --- assets/shaders/cube.frag | 9 +++++++++ assets/shaders/cube.frag.spv | 3 +++ assets/shaders/cube.vert | 17 +++++++++++++++++ assets/shaders/cube.vert.spv | 3 +++ 4 files changed, 32 insertions(+) create mode 100644 assets/shaders/cube.frag create mode 100644 assets/shaders/cube.frag.spv create mode 100644 assets/shaders/cube.vert create mode 100644 assets/shaders/cube.vert.spv diff --git a/assets/shaders/cube.frag b/assets/shaders/cube.frag new file mode 100644 index 0000000..5ec8259 --- /dev/null +++ b/assets/shaders/cube.frag @@ -0,0 +1,9 @@ +#version 450 + +layout(location = 0) in vec2 in_tex_coord; + +layout(location = 0) out vec4 out_color; + +void main () { + out_color = vec4(in_tex_coord, 1.0, 1.0); +} \ No newline at end of file diff --git a/assets/shaders/cube.frag.spv b/assets/shaders/cube.frag.spv new file mode 100644 index 0000000..23b2642 --- /dev/null +++ b/assets/shaders/cube.frag.spv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3874fa1c7782cba103fa7df1505c900506ab27a19a00f6e15c073c6a96b0f34c +size 556 diff --git a/assets/shaders/cube.vert b/assets/shaders/cube.vert new file mode 100644 index 0000000..55f6a40 --- /dev/null +++ b/assets/shaders/cube.vert @@ -0,0 +1,17 @@ + +#version 450 + +layout(location = 0) in vec3 in_position; +layout(location = 1) in vec2 in_tex_coord; + +layout(location = 0) out vec2 out_tex_coord; + +layout(push_constant) uniform PushConstants { + mat4 mvp; +} push_constants; + +void main() { + gl_Position = push_constants.mvp * vec4(in_position, 1.0); + + out_tex_coord = in_tex_coord; +} diff --git a/assets/shaders/cube.vert.spv b/assets/shaders/cube.vert.spv new file mode 100644 index 0000000..6c14b94 --- /dev/null +++ b/assets/shaders/cube.vert.spv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dcac088d9ed53209a22008ab3ad49d88dbb8e8f6b4b2a17fef5a8368856019ea +size 1360