diff --git a/projects/voxelization/src/main.cpp b/projects/voxelization/src/main.cpp index fcdb4f2b60030e2822442d47be0d38ce458d5f38..5fc41cdcc37c4624f6e9cb220c0da6ff751e5cb3 100644 --- a/projects/voxelization/src/main.cpp +++ b/projects/voxelization/src/main.cpp @@ -118,7 +118,7 @@ int main(int argc, const char** argv) { const vk::Format depthBufferFormat = vk::Format::eD32Sfloat; const vkcv::AttachmentDescription depth_attachment( - vkcv::AttachmentOperation::DONT_CARE, + vkcv::AttachmentOperation::STORE, vkcv::AttachmentOperation::LOAD, depthBufferFormat ); @@ -334,8 +334,8 @@ int main(int argc, const char** argv) { skyPipeConfig.m_VertexLayout = vkcv::VertexLayout(); skyPipeConfig.m_DescriptorLayouts = {}; skyPipeConfig.m_UseDynamicViewport = true; - skyPipeConfig.m_multisampling = msaa; - skyPipeConfig.m_depthWrite = false; + skyPipeConfig.m_multisampling = msaa; + skyPipeConfig.m_depthWrite = false; vkcv::PipelineHandle skyPipe = core.createGraphicsPipeline(skyPipeConfig); @@ -576,6 +576,8 @@ int main(int argc, const char** argv) { prepassDrawcalls, prepassRenderTargets); + core.recordImageMemoryBarrier(cmdStream, depthBuffer); + // main pass std::vector<std::array<glm::mat4, 2>> mainPassMatrices; for (const auto& m : modelMatrices) {