fixing depth image issue

This commit is contained in:
Kbz-8
2025-05-03 21:24:00 +02:00
parent 18933eeb0e
commit d9d964b75f
16 changed files with 157 additions and 54 deletions

View File

@@ -71,6 +71,7 @@ namespace Scop
pipeline_descriptor.color_attachments = { &render_target };
pipeline_descriptor.culling = VK_CULL_MODE_NONE;
pipeline_descriptor.clear_color_attachments = false;
pipeline_descriptor.name = "2D_pass_pipeline";
m_pipeline.Init(pipeline_descriptor);
}

View File

@@ -44,6 +44,7 @@ namespace Scop
pipeline_descriptor.renderer = &renderer;
pipeline_descriptor.culling = VK_CULL_MODE_NONE;
pipeline_descriptor.no_vertex_inputs = true;
pipeline_descriptor.name = "final_pass_pipeline";
m_pipeline.Init(pipeline_descriptor);
}

View File

@@ -28,6 +28,7 @@ namespace Scop
if(scene.GetForwardData().wireframe)
pipeline_descriptor.mode = VK_POLYGON_MODE_LINE;
pipeline_descriptor.clear_color_attachments = false;
pipeline_descriptor.name = "forward_pass_pipeline";
pipeline.Init(pipeline_descriptor);
}

View File

@@ -23,11 +23,12 @@ namespace Scop
if(!m_main_render_texture.IsInit())
{
auto extent = kvfGetSwapchainImagesSize(renderer.GetSwapchain().Get());
m_main_render_texture.Init({}, extent.width, extent.height, VK_FORMAT_R8G8B8A8_UNORM);
m_main_render_texture.Init({}, extent.width, extent.height, VK_FORMAT_R8G8B8A8_UNORM, false, "scop_main_render_texture");
}
m_main_render_texture.Clear(renderer.GetActiveCommandBuffer(), Vec4f{ 0.0f, 0.0f, 0.0f, 1.0f });
scene.GetDepth().Clear(renderer.GetActiveCommandBuffer(), {});
m_main_render_texture.Clear(renderer.GetActiveCommandBuffer(), Vec4f{ 0.0f, 0.0f, 0.0f, 1.0f });
m_main_render_texture.TransitionLayout(VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, renderer.GetActiveCommandBuffer());
if(scene.GetDescription().render_3D_enabled)
m_forward.Pass(scene, renderer, m_main_render_texture);

View File

@@ -58,6 +58,7 @@ namespace Scop
pipeline_descriptor.culling = VK_CULL_MODE_NONE;
pipeline_descriptor.depth_test_equal = true;
pipeline_descriptor.clear_color_attachments = false;
pipeline_descriptor.name = "skybox_pass_pipeline";
m_pipeline.Init(pipeline_descriptor);
}