Graphics: Add MaterialPassRegistry

This commit is contained in:
Jérôme Leclercq
2021-07-29 20:16:06 +02:00
parent 5b1123b971
commit 9a311da2c8
20 changed files with 181 additions and 52 deletions

View File

@@ -73,6 +73,7 @@ namespace Nz
BuildFullscreenVertexBuffer();
BuildBlitPipeline();
RegisterMaterialPasses();
SelectDepthStencilFormats();
}
@@ -165,6 +166,12 @@ namespace Nz
throw std::runtime_error("failed to fill fullscreen vertex buffer");
}
void Graphics::RegisterMaterialPasses()
{
m_materialPassRegistry.RegisterPass("DepthPass");
m_materialPassRegistry.RegisterPass("ForwardPass");
}
void Graphics::SelectDepthStencilFormats()
{
for (PixelFormat depthStencilCandidate : { PixelFormat::Depth24Stencil8, PixelFormat::Depth32FStencil8, PixelFormat::Depth16Stencil8 })