Let the backend manage the shadowmap buffers

This commit is contained in:
Magnus Norddahl 2023-05-01 02:10:43 +02:00
commit 1d8f406162
11 changed files with 49 additions and 140 deletions

View file

@ -275,17 +275,12 @@ void VkPostprocess::ClearTonemapPalette()
void VkPostprocess::UpdateShadowMap()
{
if (screen->mShadowMap->PerformUpdate())
{
VkPPRenderState renderstate(fb);
hw_postprocess.shadowmap.Update(&renderstate);
VkPPRenderState renderstate(fb);
hw_postprocess.shadowmap.Update(&renderstate);
VkImageTransition()
.AddImage(&fb->GetTextureManager()->Shadowmap, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, false)
.Execute(fb->GetCommands()->GetDrawCommands());
screen->mShadowMap->FinishUpdate();
}
VkImageTransition()
.AddImage(&fb->GetTextureManager()->Shadowmap, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, false)
.Execute(fb->GetCommands()->GetDrawCommands());
}
void VkPostprocess::NextEye(int eyeCount)