Files
the-beast-roofer-edition/src/Ryujinx.Graphics.Shader/Translation/PeriscopeProbe.cs
T
rooferdev 6634d3ef87 The Beast Roofer Edition v1.2.4
Removes a bug introduced in v1.2.3: the DLSS clip-space jitter block was
emitted into every vertex shader and read the Position output before
writing it. Reading an unwritten output is undefined, so vertex positions
could come out as garbage - whole 3D passes landing nowhere (the green
screen reported on GYLT, Ghostbusters, Blair Witch and others) and the
black block artifacts in Xenoblade Chronicles 2's motion-blur pass, which
had been mistaken for a long-standing emulation defect and worked around
by disabling the effect. With jitter off - how this fork ships - the
vertex epilogue is now identical to the base emulator again, and the
motion blur no longer needs to be disabled. CodeGenVersion bumped so
existing shader caches are rebuilt.

Also adds a DLSS sharpening slider (0-100, off by default) and an
experimental advanced motion stack checkbox (off by default).
2026-08-03 13:44:30 -04:00

39 lines
2.1 KiB
C#

// SPDX-License-Identifier: MIT
// Copyright (c) 2026 The Roofer Dev - Beast Roofer Edition. Clean-room integration code.
// Built on Ryujinx (MIT).
using System;
namespace Ryujinx.Graphics.Shader.Translation
{
/// <summary>
/// [PERISCOPE] Temporary VISUALIZATION experiment (RYUJINX_PERISCOPE=1), inert unless set.
/// Makes the screen show the RAW 64x36 motion tile map instead of the motion-blur result.
///
/// After ten cause families died by measurement (journal 121-148), the missing piece is a
/// direct LOOK at the corrupted data itself: readbacks deform it ((112)(3)), Nsight is out.
/// This probe turns the display into the debugger: in the blur shader (guest FS 0x1000AE430),
/// the first sample of the tile map (handle 0xE) is captured at translation and REPLACES the
/// shader's colour output (rt0.xyz), so the final image IS the map, one texel = 20 screen px,
/// through the normal render path -- no readback, no deformation. Alex's captures become
/// memory dumps I can analyse offline: replicated rows would say scale/clamp mismatch,
/// static blocks would say uninitialized regions, flicker would say generation mixing.
///
/// Address-gated like TILEMAP_CONST (the blur FS lacks the 0.01 fingerprint), so the shader
/// cache must be OFF for the run -- the TILEMAP-style pre-flight bat handles it. Codegen
/// probe: in the DiskCacheHostStorage interlock. Witness: the screen looks obviously wrong
/// (a coarse mosaic instead of the scene's blur) + the [PERISCOPE] log line.
/// </summary>
public static class PeriscopeProbe
{
public static readonly bool Enabled =
Environment.GetEnvironmentVariable("RYUJINX_PERISCOPE") == "1";
// [PERISCOPE2] Ladder stage 1 (journal 153): display the RAW 720p object-MV buffer,
// one pixel per texel, by capturing the temporal resolve's tcb_10 sample (guest FS
// 0x100082C30) and overriding its rt0 scene output. Same field, same return-site override.
public static readonly bool Stage2 =
Environment.GetEnvironmentVariable("RYUJINX_PERISCOPE2") == "1";
}
}