Graphics: Add support for multi-viewer rendering (a bit hacky)

This commit is contained in:
Jérôme Leclercq
2021-11-13 20:08:03 +01:00
parent 342c053faa
commit ecd1e43890
8 changed files with 80 additions and 36 deletions

View File

@@ -163,6 +163,16 @@ namespace Nz
throw std::runtime_error("failed to instantiate blit shader");
RenderPipelineInfo pipelineInfo;
// Alpha blending
pipelineInfo.blending = true;
pipelineInfo.blend.modeColor = BlendEquation::Add;
pipelineInfo.blend.modeAlpha = BlendEquation::Add;
pipelineInfo.blend.srcColor = BlendFunc::One;
pipelineInfo.blend.dstColor = BlendFunc::One;
pipelineInfo.blend.srcAlpha = BlendFunc::One;
pipelineInfo.blend.dstAlpha = BlendFunc::One;
pipelineInfo.pipelineLayout = m_blitPipelineLayout;
pipelineInfo.shaderModules.push_back(std::move(blitShader));
pipelineInfo.vertexBuffers.assign({