From 7b89a7130a998017de98dde363a8d9be61d7d44e Mon Sep 17 00:00:00 2001 From: skal Date: Sun, 22 Mar 2026 19:29:01 +0100 Subject: feat(cnn_v3): GBufferEffect Pass 2 — SDF shadow raymarching MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implements gbuf_shadow.wgsl: fullscreen render pass that reads depth from Pass 1, reconstructs world-space positions, evaluates a proxy-box SDF for each object (via inv_model), computes soft shadows for both directional lights using shadowWithStoredDistance(), and writes shadow factor to the RGBA8Unorm node_shadow_ target consumed by gbuf_pack.wgsl. Bind layout: B0=GlobalUniforms, B1=ObjectsBuffer (storage-read), B2=texture_depth_2d, B3=GBufLightsUniforms. Sky fragments (depth=1.0) are output as 1.0 (fully lit). Falls back to clear(1.0) if pipeline is not ready. 36/36 tests pass. handoff(Gemini): Pass 2 done. Pass 3 (transparency) still TODO. Phase 4 (type-aware SDF) optional after visual validation. --- src/effects/shaders.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/effects/shaders.h') diff --git a/src/effects/shaders.h b/src/effects/shaders.h index de5dda4..1664706 100644 --- a/src/effects/shaders.h +++ b/src/effects/shaders.h @@ -23,6 +23,7 @@ extern const char* ntsc_yiq_shader_wgsl; // CNN v3 G-buffer shaders extern const char* gbuf_raster_wgsl; extern const char* gbuf_pack_wgsl; +extern const char* gbuf_shadow_wgsl; extern const char* gbuf_view_wgsl; // CNN v3 inference shaders -- cgit v1.2.3