shader - cube arrays sample slices 0's +X face, and compute samples always read mip 0 (causes too-bright reflections and some blocky character shading) #5

Open
opened 2026-11-27 06:16:06 +00:00 by github-bot · 2 comments
Owner

@⁠LordLoon on GitHub · 2026-11-27 06:13 UTC · original

AI-assisted issue from my play test and some probe testing

Findings

Three rendering faults in the title on an NVIDIA RTX 4080 SUPER, with the tuned defaults:

  1. Surfaces are too reflective.
  2. Some character models show a tiled, stained-glass pattern.
  3. Bright scenes get worse the longer they run.

Two faults in the translator explain parts of this. Both are reproduced below

1. Cube arrays: every face of a later slice reads slice 0's +X face

On the console, a cube-array sample's face operand is 8 × slice + face. cube_direction
(crates/victory-shader/src/emit/lower.rs:11801, marked as a shortcut) only matches faces 0 to 5.
Any other value falls back to the first row of its table (+X), and the slice is dropped. Cube
samples are also only ever emitted as TextureCube (resource kind 5), never TextureCubeArray (9).

A probe test was run (a compute program, image_sample_l on a cube whose face f holds f + 1,
one cube bound). It reads:

face operand 0 1 4 5 8 9 12 13
face read (WARP and hardware) 0 1 4 5 0 0 0 0
expected (slice clamped to 0) 0 1 4 5 0 1 4 5

Reflection probes usually live in cube arrays, so every probe after the first shows one face of
probe 0. That fits the wrong, too-bright reflections.

Proposed fix: emit TextureCubeArray with slice = floor(face / 8) and face = face mod 8,
and create the host's cube SRVs as cube-array views (NumCubes = 1 for a single cube). A
cube-array view can show any cube, so one shader form covers both cases.

2. Implicit-LOD samples in compute programs always read level 0

Outside a pixel program, image_sample (implicit LOD) is lowered to a level-0 read
(lower.rs:11509, marked as a shortcut). The comment there counts 730 compute programs that do
this, among them the G-buffer resolves. The console takes their derivatives from the quad's lanes.

A probe test was run (four lanes of one compute quad sampling a 64² mipped cube, 8 texels apart in
x and 16 in y; each mip holds its own level number). The lanes' coordinates do differ
(1.5, 1.625, 1.75, 1.875), but every lane reads level 0 on WARP and on hardware, where the
footprint calls for about level 4.

Full-resolution reads where a coarser mip belongs alias. That fits the tiled, sparkly shading on
characters, and it adds to the specular shimmer.

Proposed fix: in compute programs, take the derivatives from the lanes with QuadReadAcrossX
/ QuadReadAcrossY (lane ^ 1, lane ^ 2, as the console pairs them) and sample with SampleGrad.

These are suspected, not shown yet:

setting suspicion
VICTORY_RT_MISS=0 With every ray a miss, reflection and probe rays reach the sky. Probes add that up over frames, which may be the slow brightening.
VICTORY_LEAN_MATH=16 (or 144) If the bright-scene decay stops, a NaN or infinity is spreading through history, bloom or exposure buffers.
VICTORY_F16_NEAREST=1 NVIDIA rounds 16-bit results toward zero, and the bias adds up in buffers that are read back every frame.
VICTORY_CARD_STEPS=0 Card steps touch the skinning passes, and the README already notes that the results are not exact.
VICTORY_SHADER_OPT=0 Rules out the clean-up passes.

Recommend an A/B test

Reproduce - probe tests

The two probe tests are #[cfg(all(test, windows))] modules built on cube_lod_tests.rs and
intersect_tests::build_compute_shader. They can be added as regression tests with the fixes

<details>
<summary>Probe tests (<code>crates/victory-shader/src/emit/cube_face_probe_tests.rs</code>)</summary>
Register the module in `crates/victory-shader/src/emit/mod.rs`, next to `cube_lod_tests`:
```rust
#[cfg(all(test, windows))]
mod cube_face_probe_tests;

Run them with cargo test -p victory-shader --locked --lib cube_ -- --nocapture.

//! Temporary probe: which face a cube sample reads for face operands of a
//! later slice (8 × slice + face).

use super::host::{Dispatch, Host, Root, View};
use super::intersect_tests::build_compute_shader;
use crate::native::{
    ComputeIo, HwStage, NativeProgram, ResourceType, RootParam, RootType, StageIo, UsedResource,
};
use windows::Win32::Graphics::Direct3D12::*;

#[test]
fn cube_face_operand_of_a_later_slice() {
    const SIZE: usize = 4;
    let mut words = vec![
        0xBE81_0380,
        0xBE83_0380,
        0xF40C_0400,
        0xFA00_0000,
        0xF408_0300,
        0xFA00_0020,
        0xF408_0601,
        0xFA00_0000,
        0x7E1E_0280,
    ];
    let faces = [0.0f32, 1.0, 4.0, 5.0, 8.0, 9.0, 12.0, 13.0];
    for (i, &face) in faces.iter().enumerate() {
        for (reg, value) in [1.5f32, 1.5, face, 0.0].iter().enumerate() {
            words.extend([0x7E00_02FF | ((reg as u32) << 17), value.to_bits()]);
        }
        // image_sample_l, CUBE, dmask R -> v10
        words.extend([0xF000_0118 | (0x24 << 18), 0x00C4_0A00]);
        words.extend([0xE070_1000 | (i as u32 * 4), 0x8003_0A0F]);
    }
    words.push(0xBF81_0000);
    let table = |slot, user_data| RootParam {
        root: RootType::Table,
        table_offset_dwords: 0,
        sgprs: 1,
        base_register: 0,
        user_data,
        slot,
    };
    let range = |kind, at, words, slot, user_data| UsedResource {
        kind,
        root: RootType::Table,
        table_offset_dwords: at,
        lower_bound: 0,
        stride: 0,
        dwords: words,
        user_data,
        slot,
    };
    let native = NativeProgram {
        stage: HwStage::Cs,
        wave64: false,
        vgprs: 16,
        layout: vec![table(0, 0), table(1, 2)],
        used: vec![
            range(ResourceType::Srv, 0, 8, 0, 0),
            range(ResourceType::Uav, 8, 4, 0, 0),
            range(ResourceType::Sampler, 0, 4, 1, 2),
        ],
        io: StageIo::Cs(ComputeIo {
            rsrc2: 3 << 1,
            threads: [1, 1, 1],
        }),
        code: words.into_iter().flat_map(u32::to_le_bytes).collect(),
    };
    let (shader, _) = build_compute_shader(&native).unwrap();
    // Face f holds f + 1.
    let texels: Vec<_> = (0..6u8)
        .flat_map(|f| std::iter::repeat_n([f32::from(f + 1); 4], SIZE * SIZE))
        .collect();
    let sampler = D3D12_SAMPLER_DESC {
        Filter: D3D12_FILTER_MIN_MAG_MIP_POINT,
        AddressU: D3D12_TEXTURE_ADDRESS_MODE_CLAMP,
        AddressV: D3D12_TEXTURE_ADDRESS_MODE_CLAMP,
        AddressW: D3D12_TEXTURE_ADDRESS_MODE_CLAMP,
        MaxLOD: f32::MAX,
        MaxAnisotropy: 1,
        ..Default::default()
    };
    for (name, warp) in [("WARP", true), ("hardware", false)] {
        let Ok(host) = Host::new(warp) else {
            eprintln!("no SM 6.6 {name} device; skipped");
            continue;
        };
        let (root, pso) = host.compute_pipeline(&shader).unwrap();
        let out = host
            .dispatch(
                &root,
                &pso,
                &Dispatch {
                    roots: vec![(0, Root::Constants(vec![0; shader.user_data_dwords() as usize]))],
                    views: &[View::Cube(SIZE as u32, 1, &texels), View::RawUav(faces.len() as u32)],
                    samplers: &[sampler],
                    groups: [1, 1, 1],
                },
            )
            .unwrap();
        let got: Vec<_> = out[0].iter().copied().map(f32::from_bits).collect();
        for (face, v) in faces.iter().zip(&got) {
            println!("PROBE {name}: face operand {face:>4} -> read face {}", v - 1.0);
        }
    }
}

/// Temporary probe: the level an implicit-LOD sample in a compute program
/// reads when its quad's lanes are 8 (x) and 16 (y) texels apart.
#[test]
fn cube_implicit_lod_in_compute() {
    const SIZE: usize = 64;
    const MIPS: u16 = 7;
    let delta = 8.0f32 / SIZE as f32;
    let mut words = vec![
        0xBE81_0380,
        0xBE83_0380,
        0xF40C_0400,
        0xFA00_0000,
        0xF408_0300,
        0xFA00_0020,
        0xF408_0601,
        0xFA00_0000,
        0x7E02_0D00, // v_cvt_f32_u32 v1, v0
        0x1002_02FF, delta.to_bits(), // v_mul_f32 v1, delta, v1
        0x0602_02FF, 1.5f32.to_bits(), // v_add_f32 v1, 1.5, v1
        0x7E04_02FF, 1.5f32.to_bits(), // v2 = 1.5
        0x7E06_0280, // v3 = 0 (+X)
        0x341E_0082, // v_lshlrev_b32 v15, 2, v0
        0xF000_0118 | (0x20 << 18), 0x00C4_0A01, // image_sample v10, v[1:3]
        0xE070_1000, 0x8003_0A0F,
        0xE070_1010, 0x8003_010F, // s coord at +16
        0xBF81_0000,
    ];
    words.shrink_to_fit();
    let table = |slot, user_data| RootParam {
        root: RootType::Table,
        table_offset_dwords: 0,
        sgprs: 1,
        base_register: 0,
        user_data,
        slot,
    };
    let range = |kind, at, words, slot, user_data| UsedResource {
        kind,
        root: RootType::Table,
        table_offset_dwords: at,
        lower_bound: 0,
        stride: 0,
        dwords: words,
        user_data,
        slot,
    };
    let native = NativeProgram {
        stage: HwStage::Cs,
        wave64: false,
        vgprs: 16,
        layout: vec![table(0, 0), table(1, 2)],
        used: vec![
            range(ResourceType::Srv, 0, 8, 0, 0),
            range(ResourceType::Uav, 8, 4, 0, 0),
            range(ResourceType::Sampler, 0, 4, 1, 2),
        ],
        io: StageIo::Cs(ComputeIo {
            rsrc2: 3 << 1,
            threads: [4, 1, 1],
        }),
        code: words.into_iter().flat_map(u32::to_le_bytes).collect(),
    };
    let (shader, _) = build_compute_shader(&native).unwrap();
    let texels: Vec<_> = (0..6)
        .flat_map(|_| {
            (0..MIPS).flat_map(|mip| std::iter::repeat_n([f32::from(mip); 4], (SIZE >> mip).pow(2)))
        })
        .collect();
    let sampler = D3D12_SAMPLER_DESC {
        Filter: D3D12_FILTER_MIN_MAG_MIP_POINT,
        AddressU: D3D12_TEXTURE_ADDRESS_MODE_CLAMP,
        AddressV: D3D12_TEXTURE_ADDRESS_MODE_CLAMP,
        AddressW: D3D12_TEXTURE_ADDRESS_MODE_CLAMP,
        MaxLOD: f32::MAX,
        MaxAnisotropy: 1,
        ..Default::default()
    };
    for (name, warp) in [("WARP", true), ("hardware", false)] {
        let Ok(host) = Host::new(warp) else {
            eprintln!("no SM 6.6 {name} device; skipped");
            continue;
        };
        let (root, pso) = host.compute_pipeline(&shader).unwrap();
        let out = host
            .dispatch(
                &root,
                &pso,
                &Dispatch {
                    roots: vec![(0, Root::Constants(vec![0; shader.user_data_dwords() as usize]))],
                    views: &[View::Cube(SIZE as u32, MIPS, &texels), View::RawUav(8)],
                    samplers: &[sampler],
                    groups: [1, 1, 1],
                },
            )
            .unwrap();
        let got: Vec<_> = out[0].iter().copied().map(f32::from_bits).collect();
        println!("PROBE {name}: compute implicit-LOD levels per lane {got:?} (footprint says ~4)");
    }
}
```
**@⁠LordLoon** on GitHub · 2026-11-27 06:13 UTC · [original](https://github.com/brothernog/rota/issues/5) AI-assisted issue from my play test and some probe testing ## Findings Three rendering faults in the title on an NVIDIA RTX 4080 SUPER, with the tuned defaults: 1. Surfaces are too reflective. 2. Some character models show a tiled, stained-glass pattern. 3. Bright scenes get worse the longer they run. Two faults in the translator explain parts of this. Both are reproduced below ## 1. Cube arrays: every face of a later slice reads slice 0's +X face On the console, a cube-array sample's face operand is `8 × slice + face`. `cube_direction` (`crates/victory-shader/src/emit/lower.rs:11801`, marked as a shortcut) only matches faces 0 to 5. Any other value falls back to the first row of its table (+X), and the slice is dropped. Cube samples are also only ever emitted as `TextureCube` (resource kind 5), never `TextureCubeArray` (9). A probe test was run (a compute program, `image_sample_l` on a cube whose face *f* holds *f* + 1, one cube bound). It reads: | face operand | 0 | 1 | 4 | 5 | 8 | 9 | 12 | 13 | |---|---|---|---|---|---|---|---|---| | face read (WARP and hardware) | 0 | 1 | 4 | 5 | 0 | **0** | **0** | **0** | | expected (slice clamped to 0) | 0 | 1 | 4 | 5 | 0 | 1 | 4 | 5 | Reflection probes usually live in cube arrays, so every probe after the first shows one face of probe 0. That fits the wrong, too-bright reflections. **Proposed fix:** emit `TextureCubeArray` with `slice = floor(face / 8)` and `face = face mod 8`, and create the host's cube SRVs as cube-array views (`NumCubes = 1` for a single cube). A cube-array view can show any cube, so one shader form covers both cases. ## 2. Implicit-LOD samples in compute programs always read level 0 Outside a pixel program, `image_sample` (implicit LOD) is lowered to a level-0 read (`lower.rs:11509`, marked as a shortcut). The comment there counts 730 compute programs that do this, among them the G-buffer resolves. The console takes their derivatives from the quad's lanes. A probe test was run (four lanes of one compute quad sampling a 64² mipped cube, 8 texels apart in x and 16 in y; each mip holds its own level number). The lanes' coordinates do differ (`1.5, 1.625, 1.75, 1.875`), but every lane reads level **0** on WARP and on hardware, where the footprint calls for about level 4. Full-resolution reads where a coarser mip belongs alias. That fits the tiled, sparkly shading on characters, and it adds to the specular shimmer. **Proposed fix:** in compute programs, take the derivatives from the lanes with `QuadReadAcrossX` / `QuadReadAcrossY` (lane ^ 1, lane ^ 2, as the console pairs them) and sample with `SampleGrad`. These are suspected, not shown yet: | setting | suspicion | |---|---| | `VICTORY_RT_MISS=0` | With every ray a miss, reflection and probe rays reach the sky. Probes add that up over frames, which may be the slow brightening. | | `VICTORY_LEAN_MATH=16` (or `144`) | If the bright-scene decay stops, a NaN or infinity is spreading through history, bloom or exposure buffers. | | `VICTORY_F16_NEAREST=1` | NVIDIA rounds 16-bit results toward zero, and the bias adds up in buffers that are read back every frame. | | `VICTORY_CARD_STEPS=0` | Card steps touch the skinning passes, and the README already notes that the results are not exact. | | `VICTORY_SHADER_OPT=0` | Rules out the clean-up passes. | Recommend an A/B test ## Reproduce - probe tests The two probe tests are `#[cfg(all(test, windows))]` modules built on `cube_lod_tests.rs` and `intersect_tests::build_compute_shader`. They can be added as regression tests with the fixes ``` <details> <summary>Probe tests (<code>crates/victory-shader/src/emit/cube_face_probe_tests.rs</code>)</summary> Register the module in `crates/victory-shader/src/emit/mod.rs`, next to `cube_lod_tests`: ```rust #[cfg(all(test, windows))] mod cube_face_probe_tests; ``` Run them with `cargo test -p victory-shader --locked --lib cube_ -- --nocapture`. ```rust //! Temporary probe: which face a cube sample reads for face operands of a //! later slice (8 × slice + face). use super::host::{Dispatch, Host, Root, View}; use super::intersect_tests::build_compute_shader; use crate::native::{ ComputeIo, HwStage, NativeProgram, ResourceType, RootParam, RootType, StageIo, UsedResource, }; use windows::Win32::Graphics::Direct3D12::*; #[test] fn cube_face_operand_of_a_later_slice() { const SIZE: usize = 4; let mut words = vec![ 0xBE81_0380, 0xBE83_0380, 0xF40C_0400, 0xFA00_0000, 0xF408_0300, 0xFA00_0020, 0xF408_0601, 0xFA00_0000, 0x7E1E_0280, ]; let faces = [0.0f32, 1.0, 4.0, 5.0, 8.0, 9.0, 12.0, 13.0]; for (i, &face) in faces.iter().enumerate() { for (reg, value) in [1.5f32, 1.5, face, 0.0].iter().enumerate() { words.extend([0x7E00_02FF | ((reg as u32) << 17), value.to_bits()]); } // image_sample_l, CUBE, dmask R -> v10 words.extend([0xF000_0118 | (0x24 << 18), 0x00C4_0A00]); words.extend([0xE070_1000 | (i as u32 * 4), 0x8003_0A0F]); } words.push(0xBF81_0000); let table = |slot, user_data| RootParam { root: RootType::Table, table_offset_dwords: 0, sgprs: 1, base_register: 0, user_data, slot, }; let range = |kind, at, words, slot, user_data| UsedResource { kind, root: RootType::Table, table_offset_dwords: at, lower_bound: 0, stride: 0, dwords: words, user_data, slot, }; let native = NativeProgram { stage: HwStage::Cs, wave64: false, vgprs: 16, layout: vec![table(0, 0), table(1, 2)], used: vec![ range(ResourceType::Srv, 0, 8, 0, 0), range(ResourceType::Uav, 8, 4, 0, 0), range(ResourceType::Sampler, 0, 4, 1, 2), ], io: StageIo::Cs(ComputeIo { rsrc2: 3 << 1, threads: [1, 1, 1], }), code: words.into_iter().flat_map(u32::to_le_bytes).collect(), }; let (shader, _) = build_compute_shader(&native).unwrap(); // Face f holds f + 1. let texels: Vec<_> = (0..6u8) .flat_map(|f| std::iter::repeat_n([f32::from(f + 1); 4], SIZE * SIZE)) .collect(); let sampler = D3D12_SAMPLER_DESC { Filter: D3D12_FILTER_MIN_MAG_MIP_POINT, AddressU: D3D12_TEXTURE_ADDRESS_MODE_CLAMP, AddressV: D3D12_TEXTURE_ADDRESS_MODE_CLAMP, AddressW: D3D12_TEXTURE_ADDRESS_MODE_CLAMP, MaxLOD: f32::MAX, MaxAnisotropy: 1, ..Default::default() }; for (name, warp) in [("WARP", true), ("hardware", false)] { let Ok(host) = Host::new(warp) else { eprintln!("no SM 6.6 {name} device; skipped"); continue; }; let (root, pso) = host.compute_pipeline(&shader).unwrap(); let out = host .dispatch( &root, &pso, &Dispatch { roots: vec![(0, Root::Constants(vec![0; shader.user_data_dwords() as usize]))], views: &[View::Cube(SIZE as u32, 1, &texels), View::RawUav(faces.len() as u32)], samplers: &[sampler], groups: [1, 1, 1], }, ) .unwrap(); let got: Vec<_> = out[0].iter().copied().map(f32::from_bits).collect(); for (face, v) in faces.iter().zip(&got) { println!("PROBE {name}: face operand {face:>4} -> read face {}", v - 1.0); } } } /// Temporary probe: the level an implicit-LOD sample in a compute program /// reads when its quad's lanes are 8 (x) and 16 (y) texels apart. #[test] fn cube_implicit_lod_in_compute() { const SIZE: usize = 64; const MIPS: u16 = 7; let delta = 8.0f32 / SIZE as f32; let mut words = vec![ 0xBE81_0380, 0xBE83_0380, 0xF40C_0400, 0xFA00_0000, 0xF408_0300, 0xFA00_0020, 0xF408_0601, 0xFA00_0000, 0x7E02_0D00, // v_cvt_f32_u32 v1, v0 0x1002_02FF, delta.to_bits(), // v_mul_f32 v1, delta, v1 0x0602_02FF, 1.5f32.to_bits(), // v_add_f32 v1, 1.5, v1 0x7E04_02FF, 1.5f32.to_bits(), // v2 = 1.5 0x7E06_0280, // v3 = 0 (+X) 0x341E_0082, // v_lshlrev_b32 v15, 2, v0 0xF000_0118 | (0x20 << 18), 0x00C4_0A01, // image_sample v10, v[1:3] 0xE070_1000, 0x8003_0A0F, 0xE070_1010, 0x8003_010F, // s coord at +16 0xBF81_0000, ]; words.shrink_to_fit(); let table = |slot, user_data| RootParam { root: RootType::Table, table_offset_dwords: 0, sgprs: 1, base_register: 0, user_data, slot, }; let range = |kind, at, words, slot, user_data| UsedResource { kind, root: RootType::Table, table_offset_dwords: at, lower_bound: 0, stride: 0, dwords: words, user_data, slot, }; let native = NativeProgram { stage: HwStage::Cs, wave64: false, vgprs: 16, layout: vec![table(0, 0), table(1, 2)], used: vec![ range(ResourceType::Srv, 0, 8, 0, 0), range(ResourceType::Uav, 8, 4, 0, 0), range(ResourceType::Sampler, 0, 4, 1, 2), ], io: StageIo::Cs(ComputeIo { rsrc2: 3 << 1, threads: [4, 1, 1], }), code: words.into_iter().flat_map(u32::to_le_bytes).collect(), }; let (shader, _) = build_compute_shader(&native).unwrap(); let texels: Vec<_> = (0..6) .flat_map(|_| { (0..MIPS).flat_map(|mip| std::iter::repeat_n([f32::from(mip); 4], (SIZE >> mip).pow(2))) }) .collect(); let sampler = D3D12_SAMPLER_DESC { Filter: D3D12_FILTER_MIN_MAG_MIP_POINT, AddressU: D3D12_TEXTURE_ADDRESS_MODE_CLAMP, AddressV: D3D12_TEXTURE_ADDRESS_MODE_CLAMP, AddressW: D3D12_TEXTURE_ADDRESS_MODE_CLAMP, MaxLOD: f32::MAX, MaxAnisotropy: 1, ..Default::default() }; for (name, warp) in [("WARP", true), ("hardware", false)] { let Ok(host) = Host::new(warp) else { eprintln!("no SM 6.6 {name} device; skipped"); continue; }; let (root, pso) = host.compute_pipeline(&shader).unwrap(); let out = host .dispatch( &root, &pso, &Dispatch { roots: vec![(0, Root::Constants(vec![0; shader.user_data_dwords() as usize]))], views: &[View::Cube(SIZE as u32, MIPS, &texels), View::RawUav(8)], samplers: &[sampler], groups: [1, 1, 1], }, ) .unwrap(); let got: Vec<_> = out[0].iter().copied().map(f32::from_bits).collect(); println!("PROBE {name}: compute implicit-LOD levels per lane {got:?} (footprint says ~4)"); } } ``` </details> ```
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 06:16:06 +00:00
Author
Owner

@⁠LordLoon on GitHub · 2026-11-27 06:19 UTC · original

Let me know if you need any logs. No crash log was created on my play test, but I may attempt another round later for a larger stress test

**@⁠LordLoon** on GitHub · 2026-11-27 06:19 UTC · [original](https://github.com/brothernog/rota/issues/5#issuecomment-7211425447) Let me know if you need any logs. No crash log was created on my play test, but I may attempt another round later for a larger stress test
Author
Owner

@⁠brothernog on GitHub · 2026-11-27 06:25 UTC · original

Thanks, this is a great write-up. Both shortcuts are where you point (lower.rs:11509 for implicit-LOD samples in compute, lower.rs:11801 for cube faces past 5), and the probe tests make them easy to check.

Some numbers from tonight's runs on an RTX 3050 8 GB that touch the same symptoms:

  • VICTORY_RT_MISS=0 is not usable here: median fps fell from about 10.5 to 7.0, VRAM went to 8.1 GB, and the opening cutscene rendered almost entirely black. So RT_MISS=1 stays for now.
  • VICTORY_CARD_ALL=1 (a current default) causes a white flash, a too-dark cutscene and banded shading. VICTORY_CARD_ALL=0 with VICTORY_CARD_BUFFERS_MIN_KB=64 and VICTORY_TEXTURE_NO_WAIT=1 gives the same or better frame rate (10.5-10.7 median) with the right picture. The defaults will change once it is confirmed.
  • The square patches on faces show on our card in every run, even with exact card steps (VICTORY_CARD_STEPS=0). One lead is that, with rays missing, the diffuse-light resolve leaves stale probe memory in screen tiles (see the top of ambient.rs). Your mip-0 finding is another good candidate for the same look, so both will get an A/B.

I'll try your fixes behind switches next to those runs and report back here. A PR with the probe tests as regression tests is very welcome if you'd like to send one.

This comment was AI-assisted.

**@⁠brothernog** on GitHub · 2026-11-27 06:25 UTC · [original](https://github.com/brothernog/rota/issues/5#issuecomment-7211518167) Thanks, this is a great write-up. Both shortcuts are where you point (`lower.rs:11509` for implicit-LOD samples in compute, `lower.rs:11801` for cube faces past 5), and the probe tests make them easy to check. Some numbers from tonight's runs on an RTX 3050 8 GB that touch the same symptoms: - `VICTORY_RT_MISS=0` is not usable here: median fps fell from about 10.5 to 7.0, VRAM went to 8.1 GB, and the opening cutscene rendered almost entirely black. So `RT_MISS=1` stays for now. - `VICTORY_CARD_ALL=1` (a current default) causes a white flash, a too-dark cutscene and banded shading. `VICTORY_CARD_ALL=0` with `VICTORY_CARD_BUFFERS_MIN_KB=64` and `VICTORY_TEXTURE_NO_WAIT=1` gives the same or better frame rate (10.5-10.7 median) with the right picture. The defaults will change once it is confirmed. - The square patches on faces show on our card in every run, even with exact card steps (`VICTORY_CARD_STEPS=0`). One lead is that, with rays missing, the diffuse-light resolve leaves stale probe memory in screen tiles (see the top of `ambient.rs`). Your mip-0 finding is another good candidate for the same look, so both will get an A/B. I'll try your fixes behind switches next to those runs and report back here. A PR with the probe tests as regression tests is very welcome if you'd like to send one. This comment was AI-assisted.
This discussion has been locked. Commenting is limited to contributors.
No description provided.