[PR #969] [MERGED] vulkan: Only reduce viewport minDepth if using depth clip control. #1857

Closed
opened 2026-02-27 21:14:14 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/969
Author: @squidbus
Created: 9/18/2024
Status: Merged
Merged: 9/25/2024
Merged by: @georgemoralis

Base: mainHead: vp-depth


📝 Commits (1)

  • e544eb3 vulkan: Only reduce viewport minDepth if using depth clip control.

📊 Changes

1 file changed (+4 additions, -1 deletions)

View changed files

📝 src/video_core/renderer_vulkan/vk_rasterizer.cpp (+4 -1)

📄 Description

Missed this from implementing depth clip control emulation in shaders. When depth clip control is unsupported and we reduce to the supported range in shaders, we also shouldn't apply the offset to the viewport minDepth.

There is still a lack of a fallback for missing VK_EXT_depth_range_unrestricted when the game adjusts the viewport depth range itself, but this fixes the case where its adjusted by us because of the clip space.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/969 **Author:** [@squidbus](https://github.com/squidbus) **Created:** 9/18/2024 **Status:** ✅ Merged **Merged:** 9/25/2024 **Merged by:** [@georgemoralis](https://github.com/georgemoralis) **Base:** `main` ← **Head:** `vp-depth` --- ### 📝 Commits (1) - [`e544eb3`](https://github.com/shadps4-emu/shadPS4/commit/e544eb35d84b9b74853398d2a57101e876891b22) vulkan: Only reduce viewport minDepth if using depth clip control. ### 📊 Changes **1 file changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/video_core/renderer_vulkan/vk_rasterizer.cpp` (+4 -1) </details> ### 📄 Description Missed this from implementing depth clip control emulation in shaders. When depth clip control is unsupported and we reduce to the supported range in shaders, we also shouldn't apply the offset to the viewport `minDepth`. There is still a lack of a fallback for missing `VK_EXT_depth_range_unrestricted` when the game adjusts the viewport depth range itself, but this fixes the case where its adjusted by us because of the clip space. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 21:14:14 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#1857
No description provided.