mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-03 17:42:41 +08:00
[pipeline] refactor custom pipeline init (#14040)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user