summaryrefslogtreecommitdiff
path: root/workspaces/main/shaders/cnn_v2/cnn_v2_static.wgsl
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-13 16:54:47 +0100
committerskal <pascal.massimino@gmail.com>2026-02-13 16:54:47 +0100
commit4c21145ce5e408dd38e8374eed320fcfac97c0c4 (patch)
tree172340a2ad720d7c4371b8897fced9a9419c53ed /workspaces/main/shaders/cnn_v2/cnn_v2_static.wgsl
parente4c1641201af04c9919410325f4e0865e8b88d5d (diff)
CNN v2: Add TODO for flexible feature layout in binary format v3
Document future enhancement for arbitrary feature vector layouts. Proposed feature descriptor in binary format v3: - Specify feature types, sources, and ordering - Enable runtime experimentation without shader recompilation - Examples: [R,G,B,dx,dy,uv_x,bias] or [mip1.r,mip2.g,laplacian,uv_x,sin20_x,bias] Added TODOs in: - CNN_V2_BINARY_FORMAT.md: Detailed proposal with struct layout - CNN_V2.md: Future extensions section - train_cnn_v2.py: compute_static_features() docstring - cnn_v2_static.wgsl: Shader header comment - cnn_v2_effect.cc: Version check comment Current limitation: Hardcoded [p0,p1,p2,p3,uv_x,uv_y,sin10_x,bias] layout. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'workspaces/main/shaders/cnn_v2/cnn_v2_static.wgsl')
-rw-r--r--workspaces/main/shaders/cnn_v2/cnn_v2_static.wgsl4
1 files changed, 4 insertions, 0 deletions
diff --git a/workspaces/main/shaders/cnn_v2/cnn_v2_static.wgsl b/workspaces/main/shaders/cnn_v2/cnn_v2_static.wgsl
index f71fad2..29acddd 100644
--- a/workspaces/main/shaders/cnn_v2/cnn_v2_static.wgsl
+++ b/workspaces/main/shaders/cnn_v2/cnn_v2_static.wgsl
@@ -2,6 +2,10 @@
// Generates 8D parametric features: [p0, p1, p2, p3, uv.x, uv.y, sin10_x, bias]
// p0-p3: Parametric features from specified mip level (0=mip0, 1=mip1, 2=mip2, 3=mip3)
// Note: Input image RGBD (mip0) fed separately to Layer 0
+//
+// TODO: Binary format should support arbitrary layout and ordering for feature vector (7D).
+// Current layout is hardcoded. Future versions should allow runtime-specified
+// feature combinations (e.g., [R, G, B, dx, dy, uv_x, bias] or custom encodings).
struct StaticFeatureParams {
mip_level: u32,