mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-17 13:39:58 -04:00
The runtime's TXD gradient transpose (gfx_shader.c patch_txd_transpose) is off for Switch 2 titles: the SM86 lowering already orders the interleaved derivatives for the translator, so transposing again swapped them back. The translator's float min, max and clamp are the NaN-safe forms (patch 0031), as Maxwell FMNMX and saturate behave, so a NaN no longer spreads through lighting and bloom on drivers that pass it on. Depth-compare gathers with per-tap offsets are split into one gather per tap like the others (patch 0032), where all four taps took the first tap's offset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
15 lines
759 B
Diff
15 lines
759 B
Diff
--- a/src/Ryujinx.Graphics.Shader/Translation/Transforms/TexturePass.cs
|
|
+++ b/src/Ryujinx.Graphics.Shader/Translation/Transforms/TexturePass.cs
|
|
@@ -431,7 +431,10 @@
|
|
|
|
LinkedListNode<INode> oldNode = node;
|
|
|
|
- if (isGather && !isShadow && hasOffsets)
|
|
+ // NX2NAVI: depth-compare gathers too. With per-tap offsets (TLD4.PTP) the else branch below adds only tap 0's
|
|
+ // offset, so a shadow map's four taps all came from one place (blocky shadow edges); one gather per tap with
|
|
+ // that tap's offset keeps its compared texel, the reference value staying in the copied sources.
|
|
+ if (isGather && hasOffsets)
|
|
{
|
|
Operand[] newSources = new Operand[sources.Length];
|
|
|