From 6fa9ccf86b0bbefb48cefae19d4162115a3d63d3 Mon Sep 17 00:00:00 2001 From: skal Date: Fri, 13 Feb 2026 23:17:42 +0100 Subject: CNN v2: Alpha channel depth handling and layer visualization Training changes: - Changed p3 default depth from 0.0 to 1.0 (far plane semantics) - Extract depth from target alpha channel in both datasets - Consistent alpha-as-depth across training/validation Test tool enhancements (cnn_test): - Added load_depth_from_alpha() for R32Float depth texture - Fixed bind group layout for UnfilterableFloat sampling - Added --save-intermediates with per-channel grayscale composites - Each layer saved as 4x wide PNG (p0-p3 stacked horizontally) - Global layers_composite.png for vertical layer stack overview Investigation notes: - Static features p4-p7 ARE computed and bound correctly - Sin_20_y pattern visibility difference between tools under investigation - Binary weights timestamp (Feb 13 20:36) vs HTML tool (Feb 13 22:12) - Next: Update HTML tool with canonical binary weights handoff(Claude): HTML tool weights update pending - base64 encoded canonical weights ready in /tmp/weights_b64.txt for line 392 replacement. Co-Authored-By: Claude Sonnet 4.5 --- src/gpu/effects/cnn_v2_effect.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gpu/effects/cnn_v2_effect.cc') diff --git a/src/gpu/effects/cnn_v2_effect.cc b/src/gpu/effects/cnn_v2_effect.cc index 5e38f13..3985723 100644 --- a/src/gpu/effects/cnn_v2_effect.cc +++ b/src/gpu/effects/cnn_v2_effect.cc @@ -530,6 +530,7 @@ void CNNv2Effect::compute(WGPUCommandEncoder encoder, params.weight_offset = info.weight_offset; params.is_output_layer = (i == layer_info_.size() - 1) ? 1 : 0; params.blend_amount = effective_blend; + params.is_layer_0 = (i == 0) ? 1 : 0; wgpuQueueWriteBuffer(ctx_.queue, layer_params_buffers_[i], 0, ¶ms, sizeof(params)); -- cgit v1.2.3