From d47233b71da0e37d35d002797873a10e842f75d0 Mon Sep 17 00:00:00 2001 From: Zanibar <91260002+taylnos@users.noreply.github.com> Date: Thu, 22 Oct 2026 23:54:41 -0500 Subject: [PATCH] The default probe is one tap for the automatic probes and water, which AMD's compiler gave no irradiance under water's own On the RX 6800 (driver 26.8.1) reflectionprobe_gl_test failed only through sampleReflectionProbesWater, at REFMAP_LEVEL 3 with 3 probes a point: 1,630 ambient taps far darker than the list's, in 8x8 blocks, one a wave. They were exactly the 39 waves whose first pixel's list was full, so it skipped water's own `if (count < REF_SAMPLE_COUNT) probeTap(0, ...)`. Every other pixel of those waves that took the tap got none of the default probe's irradiance: many read exactly amblit * (1 - refParams[0].x), the mix of a zero irradiance. The automatic probes' tap of it under `automatic && count < REF_SAMPLE_COUNT` was right in all 343 waves whose first pixel skipped it. Water and the automatic probes now take probe 0 through that one tap, where the list has room and either the automatic probes are not shut out or the point is water's, and water mixes it in as an automatic probe after. Every entry point taps the same probes as before, at both probe levels, and the probe bench's times are unchanged. The viewer lists 32 probes a point, so its water met this only where 32 probes hold a pixel. Co-Authored-By: Claude Opus 5.5 --- .../class3/deferred/reflectionProbeF.glsl | 26 +++++-------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl index 79cc9e5b55..8ce8b52302 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl @@ -746,30 +746,16 @@ void sampleProbeTaps(vec3 pos, ProbeTaps t, inout vec3 ambenv, inout vec3 glosse neighbor = 0; } } - - if (automatic && count < REF_SAMPLE_COUNT) - { // probe at index 0 is a special probe for smoothing out automatic probes - probeTap(0, pos, probeBoxPos(0, pos), t, s); - ++count; - } -#else - // Water takes probe 0 below. - if (!t.water) - { - probeTap(0, pos, probeBoxPos(0, pos), t, s); - ++count; - } #endif - if (t.water) + // Probe 0 is a special probe for smoothing out automatic probes, and water always includes it, where the list has + // room, mixing it in as an automatic probe. One tap serves both: given a tap of its own under water's condition, + // AMD's driver read the probe's irradiance as zero across a wave whose first pixel's list was full. + if ((automatic || t.water) && count < REF_SAMPLE_COUNT) { - // always include void probe on water - automatic = true; - if (count < REF_SAMPLE_COUNT) - { - probeTap(0, pos, probeBoxPos(0, pos), t, s); - } + probeTap(0, pos, probeBoxPos(0, pos), t, s); } + automatic = automatic || t.water; if (t.ambient) {