[pipeline] refactor custom pipeline init (#14040)

This commit is contained in:
hyde zhou
2023-01-13 14:02:46 +08:00
committed by pandamicro
parent 75ba0aa8d5
commit 52bccdf738
50 changed files with 717 additions and 262 deletions
@@ -248,6 +248,17 @@ ccstd::string getShaderInstanceName(const ccstd::string &name, const ccstd::vect
return ret.str();
}
void addEffectDefaultProperties(EffectAsset& effect) {
for (auto &tech : effect._techniques) {
for (auto &pass : tech.passes) {
// grab default property declaration if there is none
if (pass.propertyIndex.has_value() && !pass.properties.has_value()) {
pass.properties = tech.passes[pass.propertyIndex.value()].properties;
}
}
}
}
} // namespace render
} // namespace cc