ROADMAP.md

This commit is contained in:
2026-01-09 18:01:07 +00:00
parent 8941905f85
commit c26211feb5
4 changed files with 27 additions and 3 deletions

View File

@@ -94,7 +94,7 @@ Treat JSON config as a declarative control plane that compiles into scene, resou
- Implement `MaterialXShaderSystem` using existing MaterialX generator logic.
- Update shader loading to use the selected shader system to build `ShaderPaths`.
- Deliverable: shader generation/compilation becomes a plugin choice, not hardcoded.
- Status: `IShaderSystem` + registry wired into shader loading, with `materialx` and `glsl` systems registered; config compiler validates shader system declarations; default texture lookup is now exposed via the registry.
- Status: `IShaderSystem` + registry wired into shader loading, with `materialx` and `glsl` systems registered; config compiler validates shader system declarations; registry exposes reflection + default textures (reflection uses shader texture bindings where available).
- Acceptance: MaterialX stays working, and a second stub system (e.g., `glsl`) can be registered without touching `IGraphicsService`.
### Phase 3: Resource IR → Runtime Resource Registry (3-6 days)

View File

@@ -68,7 +68,16 @@ ShaderReflection GlslShaderSystem::GetReflection(const std::string& shaderKey) c
if (logger_) {
logger_->Trace("GlslShaderSystem", "GetReflection", "shaderKey=" + shaderKey);
}
return {};
ShaderReflection reflection;
auto it = lastShaderMap_.find(shaderKey);
if (it == lastShaderMap_.end()) {
return reflection;
}
reflection.textures.reserve(it->second.textures.size());
for (const auto& binding : it->second.textures) {
reflection.textures.push_back(binding.uniformName);
}
return reflection;
}
std::vector<ShaderPaths::TextureBinding> GlslShaderSystem::GetDefaultTextures(

View File

@@ -123,7 +123,16 @@ ShaderReflection MaterialXShaderSystem::GetReflection(const std::string& shaderK
if (logger_) {
logger_->Trace("MaterialXShaderSystem", "GetReflection", "shaderKey=" + shaderKey);
}
return {};
ShaderReflection reflection;
auto it = lastShaderMap_.find(shaderKey);
if (it == lastShaderMap_.end()) {
return reflection;
}
reflection.textures.reserve(it->second.textures.size());
for (const auto& binding : it->second.textures) {
reflection.textures.push_back(binding.uniformName);
}
return reflection;
}
std::vector<ShaderPaths::TextureBinding> MaterialXShaderSystem::GetDefaultTextures(

View File

@@ -70,6 +70,10 @@ TEST(ShaderSystemRegistryTest, UsesActiveGlslSystem) {
auto shaderMap = registry.BuildShaderMap();
EXPECT_EQ(registry.GetActiveSystemId(), "glsl");
auto reflection = registry.GetReflection("flat");
EXPECT_TRUE(reflection.textures.empty());
auto defaults = registry.GetDefaultTextures("flat");
EXPECT_TRUE(defaults.empty());
auto it = shaderMap.find("flat");
ASSERT_NE(it, shaderMap.end());
EXPECT_EQ(it->second.vertex, "shaders/flat.vs");
@@ -107,6 +111,8 @@ TEST(ShaderSystemRegistryTest, FiltersShadersBySystem) {
EXPECT_NE(shaderMap.find("glsl"), shaderMap.end());
EXPECT_NE(shaderMap.find("default"), shaderMap.end());
EXPECT_EQ(shaderMap.find("mx"), shaderMap.end());
auto reflection = registry.GetReflection("glsl");
EXPECT_TRUE(reflection.textures.empty());
}
} // namespace