Changing render attachment sharing

This commit is contained in:
Dynamitos
2024-02-01 10:21:36 +01:00
parent 725e7cb67b
commit e717c577d4
17 changed files with 161 additions and 173 deletions
+4 -4
View File
@@ -70,10 +70,10 @@ void UIPass::publishOutputs()
depthBuffer = graphics->createTexture2D(depthBufferInfo);
depthAttachment =
new Gfx::RenderTargetAttachment(depthBuffer,
Gfx::RenderTargetAttachment(depthBuffer,
Gfx::SE_IMAGE_LAYOUT_UNDEFINED, Gfx::SE_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL,
Gfx::SE_ATTACHMENT_LOAD_OP_CLEAR, Gfx::SE_ATTACHMENT_STORE_OP_STORE);
depthAttachment->clear.depthStencil.depth = 1.0f;
depthAttachment.clear.depthStencil.depth = 1.0f;
resources->registerRenderPassOutput("UIPASS_DEPTH", depthAttachment);
TextureCreateInfo colorBufferInfo = {
@@ -84,10 +84,10 @@ void UIPass::publishOutputs()
};
colorBuffer = graphics->createTexture2D(colorBufferInfo);
renderTarget =
new Gfx::RenderTargetAttachment(colorBuffer,
Gfx::RenderTargetAttachment(colorBuffer,
Gfx::SE_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, Gfx::SE_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
Gfx::SE_ATTACHMENT_LOAD_OP_CLEAR, Gfx::SE_ATTACHMENT_STORE_OP_STORE);
renderTarget->clear.color = { {0.0f, 0.0f, 0.0f, 1.0f} };
renderTarget.clear.color = { {0.0f, 0.0f, 0.0f, 1.0f} };
resources->registerRenderPassOutput("UIPASS_COLOR", renderTarget);
}