fixes
All checks were successful
CI / build-test-release (push) Successful in 15m14s

This commit is contained in:
Jorijn van der Graaf 2026-05-02 21:08:51 +02:00
commit d7a9c85ea6
11 changed files with 183 additions and 43 deletions

View file

@ -0,0 +1,16 @@
#version 450
#extension GL_GOOGLE_include_directive : require
#include "ui-shared.glsl"
layout(location = 0) out vec3 color;
void main() {
vec2 positions[3] = vec2[](
vec2( 0.0, -0.5),
vec2( 0.5, 0.5),
vec2(-0.5, 0.5)
);
gl_Position = vec4(positions[gl_VertexIndex], 0.0, 1.0);
color = ui_color();
}

View file

@ -0,0 +1 @@
crafter-build asset

View file

@ -0,0 +1 @@
nested asset

View file

@ -0,0 +1,8 @@
#ifndef UI_SHARED_GLSL
#define UI_SHARED_GLSL
vec3 ui_color() {
return vec3(0.25, 0.5, 1.0);
}
#endif

View file

@ -16,6 +16,9 @@ extern "C" Configuration CrafterBuildProject(std::span<const std::string_view>)
ShaderLib->GetInterfacesAndImplementations(ifaces, impls);
}
ShaderLib->shaders.emplace_back("./lib/triangle.glsl", "main", ShaderType::Vertex);
ShaderLib->files.emplace_back("./lib/asset.txt");
ShaderLib->files.emplace_back("./lib/data");
ShaderLib->buildFiles.emplace_back("./lib/ui-shared.glsl");
Configuration app;
app.path = "./";
@ -29,5 +32,6 @@ extern "C" Configuration CrafterBuildProject(std::span<const std::string_view>)
std::array<fs::path, 1> impls = { "main" };
app.GetInterfacesAndImplementations(ifaces, impls);
}
app.shaders.emplace_back("./consumer.glsl", "main", ShaderType::Vertex);
return app;
}