From 826ba150c88816ed357029592a77720081b1d754 Mon Sep 17 00:00:00 2001 From: Ahyildiz <87144467+Ahyildiz@users.noreply.github.com> Date: Fri, 27 Nov 2026 12:28:57 +0300 Subject: [PATCH] Ambient: drop violet probe garbage before the raise (purple blotch on lit paper) The probes' resolve can leave magenta/violet leftovers from other memory in the light image. The raise pass caps what it keeps by luminance only, which weights blue at 0.07, so a blue-heavy leftover passes the cap and shows as a saturated purple-blue glow on bright surfaces (a sheet of music on the wall in the prison cell cutscene, Series S, DLSS off, RTX 5080). VIctory-Belobug-AMD drops magenta leftovers here (ambient.rs, "Filter magenta garbage probes"); that line is ported, plus one for the bluer kind (blue over 2.5x green and over red) that the first leaves as a faint violet. Sky light (green above 0.4x blue) and sunsets (low blue) are not touched. Checked with VICTORY_CAPTURE frames of the same cutscene: the glow is gone in two runs; frame time unchanged (~35 ms median, 25-27 fps). Turning off VICTORY_AMBIENT_SPECULAR, VICTORY_AMBIENT_AIR or all VICTORY_AMBIENT* does not remove it (it is the title's leftover, unbounded with the raise off). Co-Authored-By: Claude Opus 5.5 --- crates/victory-gpu/src/ambient.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/victory-gpu/src/ambient.rs b/crates/victory-gpu/src/ambient.rs index 836c2e2..e7153c1 100644 --- a/crates/victory-gpu/src/ambient.rs +++ b/crates/victory-gpu/src/ambient.rs @@ -461,6 +461,15 @@ void raise(uint3 at : SV_DispatchThreadID) { found = clamp(found, 0.2 * all, 2.5 * all); found = lerp(found, cells[CELLS].rgb, 0.2) * level * open; float3 was = unpack(light[p]); + // Magenta/violet garbage the probes' memory held (green far under red and + // blue): dropped, as VIctory-Belobug-AMD does (ambient.rs, "Filter magenta + // garbage probes"). Seen on an RTX 5080 as a purple-blue glow on a lit + // sheet of paper in the prison cell; not an AMD-only fault. + if (was.g < 0.5 * min(was.r, was.b) && max(was.r, was.b) > 0.02) was = 0.0; + // And the bluer kind of it (blue over 2.5x green and over red): left as + // a faint violet by the line above. The sky's light keeps green above + // 0.4x blue, sunsets keep blue low, so neither is touched. + if (was.b > 2.5 * was.g && was.b > was.r && was.b > 0.02) was = 0.0; // What the program left counts as far as it can be true: the sky's light // outdoors, not the blocks of other memory. float top = max(dot(found, LUMA) * most, 1e-6);