From 8b30cadfc19647487986d14dba9ddba7908dd1d0 Mon Sep 17 00:00:00 2001 From: skal Date: Thu, 12 Feb 2026 15:10:17 +0100 Subject: test_demo: Add beat-synchronized CNN post-processing with version selection - Add --cnn-version <1|2> flag to select between CNN v1 and v2 - Implement beat_phase modulation for dynamic blend in both CNN effects - Fix CNN v2 per-layer uniform buffer sharing (each layer needs own buffer) - Fix CNN v2 y-axis orientation to match render pass convention - Add Scene1Effect as base visual layer to test_demo timeline - Reorganize CNN v2 shaders into cnn_v2/ subdirectory - Update asset paths and documentation for new shader organization Co-Authored-By: Claude Sonnet 4.5 --- src/gpu/effects/cnn_effect.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/gpu/effects/cnn_effect.h') diff --git a/src/gpu/effects/cnn_effect.h b/src/gpu/effects/cnn_effect.h index 1c9f0f3..3e2b7ca 100644 --- a/src/gpu/effects/cnn_effect.h +++ b/src/gpu/effects/cnn_effect.h @@ -34,10 +34,17 @@ class CNNEffect : public PostProcessEffect { return layer_index_ == 0; } + void set_beat_modulation(bool enabled, float scale = 1.0f) { + beat_modulated_ = enabled; + beat_scale_ = scale; + } + private: int layer_index_; int total_layers_; float blend_amount_; + bool beat_modulated_ = false; + float beat_scale_ = 1.0f; WGPUTextureView input_view_; WGPUTextureView original_view_; UniformBuffer params_buffer_; -- cgit v1.2.3