From 0793c20c1dd0c5f0c535f7da90337081939b2cfc Mon Sep 17 00:00:00 2001 From: skal Date: Fri, 13 Feb 2026 16:57:29 +0100 Subject: CNN v2: Change feature #6 from sin(10*x) to sin(20*y) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update positional encoding to use vertical coordinate at higher frequency. Changes: - train_cnn_v2.py: sin10_x → sin20_y (computed from uv_y) - cnn_v2_static.wgsl: sin10_x → sin20_y (computed from uv_y) - index.html: sin10_x → sin20_y (STATIC_SHADER) - CNN_V2.md: Update feature descriptions and examples - CNN_V2_BINARY_FORMAT.md: Update static features documentation Feature vector: [p0, p1, p2, p3, uv_x, uv_y, sin20_y, bias] Rationale: Higher frequency (20 vs 10) + vertical axis provides better spatial discrimination for position encoding. Co-Authored-By: Claude Sonnet 4.5 --- tools/cnn_v2_test/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/cnn_v2_test/index.html') diff --git a/tools/cnn_v2_test/index.html b/tools/cnn_v2_test/index.html index 88c4733..cab20ea 100644 --- a/tools/cnn_v2_test/index.html +++ b/tools/cnn_v2_test/index.html @@ -414,13 +414,13 @@ fn main(@builtin(global_invocation_id) id: vec3) { let d = textureLoad(depth_tex, coord, 0).r; let uv_x = f32(coord.x) / f32(dims.x); let uv_y = 1.0 - (f32(coord.y) / f32(dims.y)); - let sin10_x = sin(10.0 * uv_x); + let sin20_y = sin(20.0 * uv_y); let packed = vec4( pack2x16float(vec2(rgba.r, rgba.g)), pack2x16float(vec2(rgba.b, d)), pack2x16float(vec2(uv_x, uv_y)), - pack2x16float(vec2(sin10_x, 1.0)) + pack2x16float(vec2(sin20_y, 1.0)) ); textureStore(output_tex, coord, packed); }`; -- cgit v1.2.3