Make linearized depth data available to translucent material shaders via the texture name SceneLinearDepth. Does it work? Who knows!

This commit is contained in:
Magnus Norddahl 2024-09-08 02:32:01 +02:00
commit 1b8effe1ea
17 changed files with 183 additions and 32 deletions

View file

@ -244,6 +244,17 @@ void VkPostprocess::DrawPresentTexture(const IntRect &box, bool applyGamma, bool
renderstate.Draw();
}
void VkPostprocess::UpdateLinearDepthTexture()
{
int sceneWidth = fb->GetBuffers()->GetSceneWidth();
int sceneHeight = fb->GetBuffers()->GetSceneHeight();
VkPPRenderState renderstate(fb);
hw_postprocess.linearDepth.Render(&renderstate, sceneWidth, sceneHeight);
ImageTransitionScene(false);
}
void VkPostprocess::AmbientOccludeScene(float m5)
{
int sceneWidth = fb->GetBuffers()->GetSceneWidth();