From 9b91d2782c59fda1212ff761ac873b3e1b1ed058 Mon Sep 17 00:00:00 2001 From: readmet3xt-lab <238408149+readmet3xt-lab@users.noreply.github.com> Date: Fri, 27 Nov 2026 02:15:51 +0530 Subject: [PATCH] Reflections stand-in: the depth is the picture's, twice the rays' image each way Run final-4 (2026-11-27 02:11): with placed views resolved the miss program's tables were found, but the stand-in was still left out ("another image", format 26): the depth taken failed the size check. The depth must now be twice the rays' image each way (1706x960 for 853x480) and 32-bit, at the usual place or found among the tables. Co-Authored-By: Claude Opus 5.5 --- crates/victory-gpu/src/draw.rs | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/crates/victory-gpu/src/draw.rs b/crates/victory-gpu/src/draw.rs index 95440ad..7a1bfea 100644 --- a/crates/victory-gpu/src/draw.rs +++ b/crates/victory-gpu/src/draw.rs @@ -3902,10 +3902,33 @@ impl State { let size = image.as_ref().map(|(d, _)| (d.Width, d.Height)); scan(ResourceType::Srv, &|d| depth_like(d) && size == Some((d.Width, d.Height))) }), - Role::Miss => usual_depth(MISS_DEPTH).or_else(|| { + Role::Miss => usual_depth(MISS_DEPTH) + .filter(|(d, _)| { + image.as_ref().is_some_and(|(i, _)| { + d.Width.abs_diff(i.Width * 2) <= 1 && u64::from(d.Height).abs_diff(u64::from(i.Height) * 2) <= 1 + }) + }) + .or_else(|| { let half = image.as_ref().map(|(d, _)| (d.Width, d.Height)); + // The picture's depth: twice the rays' image each way (run + // final-4: a looser match took another depth texture, which the + // size check then refused, "another image"). scan(ResourceType::Srv, &|d| { - depth_like(d) && half.is_some_and(|(w, h)| d.Width >= w && d.Height >= h && d.Width <= w * 4) + use windows::Win32::Graphics::Dxgi::Common::{ + DXGI_FORMAT_D32_FLOAT, DXGI_FORMAT_D32_FLOAT_S8X24_UINT, DXGI_FORMAT_R32_TYPELESS, + DXGI_FORMAT_R32G8X24_TYPELESS, + }; + depth_like(d) + && matches!( + d.Format, + DXGI_FORMAT_R32_TYPELESS + | DXGI_FORMAT_D32_FLOAT + | DXGI_FORMAT_R32G8X24_TYPELESS + | DXGI_FORMAT_D32_FLOAT_S8X24_UINT + ) + && half.is_some_and(|(w, h)| { + d.Width.abs_diff(w * 2) <= 1 && u64::from(d.Height).abs_diff(u64::from(h) * 2) <= 1 + }) }) }), Role::Radiance | Role::Air => image,