Two colorful triangles

This commit is contained in:
2025-05-09 20:11:45 +03:00
commit 3701ab66dd
5 changed files with 239 additions and 0 deletions

View File

@ -0,0 +1,9 @@
#version 460
layout(location=0) in vec3 color;
layout(location=0) out vec4 frag_color;
void main() {
frag_color = vec4(color, 1);
}

View File

@ -0,0 +1,16 @@
#version 460
layout(set=1, binding=0) uniform UBO {
mat4 mvp;
};
layout(location=0) in vec3 position;
layout(location=1) in vec3 color;
layout(location=0) out vec3 out_color;
void main() {
gl_Position = mvp * vec4(position, 1);
out_color = color;
}