Multi pass
All checks were successful
CI / React UI Build (push) Successful in 10s
CI / Native Windows Build And Tests (push) Successful in 2m16s
CI / Windows Release Package (push) Successful in 2m28s

This commit is contained in:
2026-05-08 17:28:48 +10:00
parent 596d370f43
commit f85abef237
15 changed files with 197 additions and 66 deletions

View File

@@ -1302,7 +1302,7 @@ bool RuntimeHost::TryAdvanceFrame()
bool RuntimeHost::BuildLayerFragmentShaderSource(const std::string& layerId, std::string& fragmentShaderSource, std::string& error)
{
std::vector<std::pair<std::string, std::string>> passSources;
std::vector<ShaderPassBuildSource> passSources;
if (!BuildLayerPassFragmentShaderSources(layerId, passSources, error))
return false;
if (passSources.empty())
@@ -1310,11 +1310,11 @@ bool RuntimeHost::BuildLayerFragmentShaderSource(const std::string& layerId, std
error = "Shader layer produced no compiled passes: " + layerId;
return false;
}
fragmentShaderSource = passSources.front().second;
fragmentShaderSource = passSources.front().fragmentShaderSource;
return true;
}
bool RuntimeHost::BuildLayerPassFragmentShaderSources(const std::string& layerId, std::vector<std::pair<std::string, std::string>>& passSources, std::string& error)
bool RuntimeHost::BuildLayerPassFragmentShaderSources(const std::string& layerId, std::vector<ShaderPassBuildSource>& passSources, std::string& error)
{
try
{
@@ -1342,10 +1342,13 @@ bool RuntimeHost::BuildLayerPassFragmentShaderSources(const std::string& layerId
passSources.reserve(shaderPackage.passes.size());
for (const ShaderPassDefinition& pass : shaderPackage.passes)
{
std::string fragmentShaderSource;
if (!compiler.BuildPassFragmentShaderSource(shaderPackage, pass, fragmentShaderSource, error))
ShaderPassBuildSource passSource;
passSource.passId = pass.id;
passSource.inputNames = pass.inputNames;
passSource.outputName = pass.outputName;
if (!compiler.BuildPassFragmentShaderSource(shaderPackage, pass, passSource.fragmentShaderSource, error))
return false;
passSources.push_back(std::make_pair(pass.id, std::move(fragmentShaderSource)));
passSources.push_back(std::move(passSource));
}
return true;
}