mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-26 16:25:58 +03:00
[PR #3958] [MERGED] shader_recompiler: VS clip distance emulation for NVIDIA GPUs #3825
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#3825
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/shadps4-emu/shadPS4/pull/3958
Author: @psucien
Created: 1/25/2026
Status: ✅ Merged
Merged: 1/26/2026
Merged by: @georgemoralis
Base:
main← Head:fix/clip_distance_emulation📝 Commits (1)
10ed5a0shader_recompiler: VS clip distance emulation for NVIDIA GPUs📊 Changes
10 files changed (+116 additions, -24 deletions)
View changed files
📝
CMakeLists.txt(+1 -0)📝
externals/CMakeLists.txt(+1 -0)📝
src/shader_recompiler/backend/spirv/spirv_emit_context.cpp(+41 -10)📝
src/shader_recompiler/ir/attribute.cpp(+1 -1)➕
src/shader_recompiler/ir/passes/inject_clip_distance_attributes.cpp(+41 -0)📝
src/shader_recompiler/ir/passes/ir_passes.h(+2 -1)📝
src/shader_recompiler/profile.h(+1 -1)📝
src/shader_recompiler/recompiler.cpp(+10 -7)📝
src/shader_recompiler/runtime_info.h(+5 -2)📝
src/video_core/renderer_vulkan/vk_pipeline_cache.cpp(+13 -2)📄 Description
It looks like NVIDIA GPUs have precision issues with clip distances interpolation. At least the result slightly differs from what we see on AMD (and there is evidence even on Intel) GPUs, which usually results in artifacts like black stripes on tilted polygons. This PR adds emulation of VS outputted clip distances via discards on FS stage for NVIDIA cards.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.