mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-27 16:02:37 +00:00
render: fix depth mapping for -1 to 1 viewports
This commit is contained in:
1 parent
3213934d42
commit
3624d96c78
2 files changed
+3
-11
No files matched your search
@@ -350,7 +350,8 @@ static void SetGraphicsDynamicParams(const CommandBuffer& buffer, vk::CommandBuf
|
||||
viewport.width = vp.viewports[0].xscale * 2.0f;
|
||||
viewport.height = vp.viewports[0].yscale * 2.0f;
|
||||
}
|
||||
viewport.minDepth = vp.viewports[0].zoffset;
|
||||
viewport.minDepth = vp.viewports[0].zoffset -
|
||||
(ctx.GetClipControl().dx_clip_space ? 0.0f : vp.viewports[0].zscale);
|
||||
viewport.maxDepth = vp.viewports[0].zscale + vp.viewports[0].zoffset;
|
||||
vk_buffer.setViewport(0, 1, &viewport);
|
||||
|
||||
|
||||
Reference in new issue
Block a user