Files
Triforce-Source/gpu/PROVENANCE.md
ruckus7382sfgsgdf 4fa4f9188b Triforce v0.8.0
Evil HD (SMAA Ultra, 16x filtering, full textures, ambient occlusion with bounce light, sunlight shafts, foliage drawn 4x as far, the remastered texture pack's loader and the launcher's download of it), FSR 3.1 frame generation for every GPU, Intel XeSS, FSR 4 model choice, ReShade presets, Auto (this PC), HUD placement, the options menu in 13 languages, a second input for every control, hold to toggle, DualSense speaker and haptics, NFC from the player's own dumps, the above-60 fps game fixes, the Debug tab's flight and Inventory fixes, the launcher's full settings, and over 250 fixes.
2026-11-25 10:21:32 -06:00

3.4 KiB

gpu/: the standalone build's renderer

render/, compat/ and third_party/suyu/ are TOTKPort's renderer (a64-kit/gpu/, commit e88744a, 2026-10-31): the native NVN layer's replay on WebGPU (wgpu-native on the PC), its texture, buffer, pipeline and present code, and suyu's shader recompiler with TOTKPort's WGSL backend. host/nvn_native.c and host/display.c are the API side and the window, from the same commit (see host/PROVENANCE.md).

Licensing as in TOTKPort's NOTICE.md: suyu's parts are GPL-2.0-or-later / GPL-3.0-or-later per file (texts in third_party/suyu/); render/nvn_api.h (h1k421, as adapted by jhaizhou), the NVN layer's design (jhaizhou's d2r-mobile / MacNativeGames) and the FSR 1 port in render/rx_present_fx.cpp are MIT; render/renderdoc_app.h is RenderDoc's MIT header. wgpu-native (MIT or Apache-2.0) is not vendored: nx2/build.py takes TOTKPort's build of it (WGPU_NATIVE for another).

mkw-recomp's changes, for the Switch 2:

  • Ampere shaders. third_party/suyu/shader_recompiler/frontend/ampere/ is Eglantine's Ampere-to-Maxwell lowering (header-only; Eden Emulator Project, GPL-3.0-or-later, from the work/eg clone). environment.h gains TranslateProgramAddress and the control flow passes indirect branch targets through it, as in Eglantine.
  • NVN2 shader packages (render/rx_shader.cpp read_nvn_code): the control section's layout (magic 0x98761234, code length +0x38, c1 constants +0x40..+0x44, stage +0x56, workgroup +0x58), the 128-byte graphics program header, and the lowering before the Maxwell frontend.
  • The Switch 2's GOB swizzle (the Tegra X1's with offset bits 5 and 6 swapped, from Eglantine's native tiling): third_party/suyu/video_core/textures/decoders.h (the CPU swizzle masks), the two WGSL unswizzles in render/rx_texture_gpu.cpp, and bl_offset in render/rx_nvn.cpp.
  • The 64-bit guest window: per-page tables in render/rx_buffer.cpp are committed untouched (PageTable).
  • The window crop (rx_present_crop): MKW renders at a dynamic size into a 3840x2160 window texture and crops it; the crop is copied out and presented.

The renderer the game uses by default is no longer this one but the Vulkan back end in vk/ (vk/VULKAN.md); this one stays as the fallback (on Windows, in a build made with wgpu-native). mkw-recomp's earlier Vulkan stand-in (mkw_gpu.cpp, build-gpu.bat) did not come over. shadertool.cpp (built by build-shadertool.bat against the Eglantine clone) runs dumped NVN2 programs through Eglantine's recompiler offline (SPIR-V; it prints what each program reads from the constant banks).

Hookshot's AMD FSR 4 (vk/vk_fsr4.cpp) was first written for Lichii's OoT branch (madebyjordan/Lichii-Hyrule, renderer_vulkan/vk_fsr4_upscaler.cpp; GPL-3.0-or-later), with its Linux path (a Vulkan FSR 4 library through dlopen) by N3oTraX. It draws with the frame chain of hckrman101's NVIDIA DLSS (#841), moved into vk/vk_temporal.cpp so both upscalers share it. third_party/fidelityfx/ is AMD's FSR API headers from FidelityFX SDK v2.4.0 (MIT, LICENSE.md); AMD's signed DLLs are loaded from the user's PC at run time and are not vendored. Intel XeSS Super Resolution (vk/vk_xess.cpp, vk/xess_rules.h) is the chain's third engine. third_party/xess/ is Intel's MIT XeSS API headers only (its PROVENANCE.md); Intel's libxess.dll is the player's, loaded at run time from their PC and never vendored, linked or downloaded.