Added KRMesh::isReady

Vulkan test code now uses KRMesh and asset ingestion pipeline for vertex and index data.
Updated Vulkan test shader to match KRMesh attribute layout.
This commit is contained in:
2022-07-07 00:23:14 -07:00
parent e976e94da1
commit 88a1ca186b
4 changed files with 26 additions and 17 deletions

View File

@@ -5,17 +5,11 @@
layout(location = 0) out vec3 fragColor;
layout(location = 0) in vec3 vertex_position;
layout(location = 1) in vec3 vertex_uv;
layout(location = 1) in vec3 vertex_normal;
layout(location = 2) in vec3 vertex_tangent;
layout(constant_id = 0) const int QUALITY_LEVEL = 64; // Specialization constant test
vec3 colors[4] = vec3[](
vec3(1.0, 0.0, 0.0),
vec3(0.0, 1.0, 0.0),
vec3(0.0, 0.0, 1.0),
vec3(1.0, 0.0, 1.0)
);
void main() {
gl_Position = vec4(vertex_position * 0.5, 1.0);
fragColor = colors[gl_VertexIndex];
fragColor = vertex_normal * 0.25 + vec3(0.5, 0.5, 0.5);
}