Add standalone testbed

This commit is contained in:
goaaats 2025-04-07 20:05:11 +02:00
parent 5ddf473450
commit b8ce2d4001
21 changed files with 948 additions and 2 deletions

View file

@ -0,0 +1,2 @@
glslangvalidator -V imgui-vertex.glsl -o imgui-vertex.spv -S vert
glslangvalidator -V imgui-frag.glsl -o imgui-frag.spv -S frag

View file

@ -0,0 +1,16 @@
#version 450
#extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_shading_language_420pack : enable
layout(set = 1, binding = 0) uniform texture2D FontTexture;
layout(set = 0, binding = 1) uniform sampler FontSampler;
layout (location = 0) in vec4 color;
layout (location = 1) in vec2 texCoord;
layout (location = 0) out vec4 outputColor;
void main()
{
outputColor = color * texture(sampler2D(FontTexture, FontSampler), texCoord);
}

View file

@ -0,0 +1,28 @@
#version 450
#extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_shading_language_420pack : enable
layout (location = 0) in vec2 in_position;
layout (location = 1) in vec2 in_texCoord;
layout (location = 2) in vec4 in_color;
layout (binding = 0) uniform ProjectionMatrixBuffer
{
mat4 projection_matrix;
};
layout (location = 0) out vec4 color;
layout (location = 1) out vec2 texCoord;
out gl_PerVertex
{
vec4 gl_Position;
};
void main()
{
gl_Position = projection_matrix * vec4(in_position, 0, 1);
color = in_color;
texCoord = in_texCoord;
}