mirror of
https://github.com/Kbz-8/42_vox.git
synced 2026-01-13 15:43:34 +00:00
fixing depth image issue
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user