mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-21 21:05:56 +00:00
Give fragment shaders that set NVN control byte 0x718 early fragment tests, as MacNativeGames ae8f4f4 does: the request carries early_fragment_tests and the translator passes it to Ryujinx as EarlyZForce
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
679c6771df
commit
be759ca618
2 files changed
+8
-1
No files matched your search
@@ -89,7 +89,10 @@ static class SwshXlate
|
||||
if (_job["fout"] is JsonObject f) foreach (var kv in f) fout[int.Parse(kv.Key)] = Attr((string)kv.Value);
|
||||
// Vulkan: VK_EXT_depth_clip_control handles NEAR_IS_MINUS_W, so the shader is never rewritten ("depth_minus_w" in a job is ignored).
|
||||
const bool depthMinusW = false;
|
||||
return new GpuGraphicsState(false, InputTopology.Triangles, false, TessPatchType.Triangles, TessSpacing.EqualSpacing,
|
||||
// "early_fragment_tests": the fragment shader's NVN control byte +0x718 (the driver's early-Z-force, Ryujinx's
|
||||
// EarlyZForce); the SPIR-V then declares EarlyFragmentTests (MacNativeGames ae8f4f4).
|
||||
bool earlyZ = _job["early_fragment_tests"] is JsonValue ez && ez.TryGetValue<bool>(out bool eb) && eb;
|
||||
return new GpuGraphicsState(earlyZ, InputTopology.Triangles, false, TessPatchType.Triangles, TessSpacing.EqualSpacing,
|
||||
false, false, false, depthMinusW, false, 1f, AlphaTestOp.Always, 0f, attr, false, fout, false,
|
||||
false /* 不做 Y 取反 | no Y flip */, true /* 原点左上 | origin upper-left */, false);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user