Normalize builtin forward shader bindings

This commit is contained in:
2026-04-05 13:50:52 +08:00
parent f407e2d15c
commit ec96d2c7e5
17 changed files with 131 additions and 150 deletions

View File

@@ -236,37 +236,6 @@ inline BuiltinPassResourceSemantic ResolveBuiltinPassResourceSemantic(
return BuiltinPassResourceSemantic::Unknown;
}
inline Containers::Array<Resources::ShaderResourceBindingDesc> BuildLegacyBuiltinForwardPassResourceBindings() {
Containers::Array<Resources::ShaderResourceBindingDesc> bindings;
bindings.Resize(4);
bindings[0].name = "PerObjectConstants";
bindings[0].type = Resources::ShaderResourceType::ConstantBuffer;
bindings[0].set = 1;
bindings[0].binding = 0;
bindings[0].semantic = "PerObject";
bindings[1].name = "MaterialConstants";
bindings[1].type = Resources::ShaderResourceType::ConstantBuffer;
bindings[1].set = 2;
bindings[1].binding = 0;
bindings[1].semantic = "Material";
bindings[2].name = "BaseColorTexture";
bindings[2].type = Resources::ShaderResourceType::Texture2D;
bindings[2].set = 3;
bindings[2].binding = 0;
bindings[2].semantic = "BaseColorTexture";
bindings[3].name = "LinearClampSampler";
bindings[3].type = Resources::ShaderResourceType::Sampler;
bindings[3].set = 4;
bindings[3].binding = 0;
bindings[3].semantic = "LinearClampSampler";
return bindings;
}
inline bool IsBuiltinPassResourceTypeCompatible(
BuiltinPassResourceSemantic semantic,
Resources::ShaderResourceType type) {