summaryrefslogtreecommitdiff
path: root/src/gpu/effects/cnn_effect.h
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-12 15:10:17 +0100
committerskal <pascal.massimino@gmail.com>2026-02-12 15:10:17 +0100
commit8b30cadfc19647487986d14dba9ddba7908dd1d0 (patch)
treef865b42945f72bfc480e2c2a6849127bf56d1a59 /src/gpu/effects/cnn_effect.h
parent1effb125973ac0948de3015be1d53ae72463858b (diff)
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 <noreply@anthropic.com>
Diffstat (limited to 'src/gpu/effects/cnn_effect.h')
-rw-r--r--src/gpu/effects/cnn_effect.h7
1 files changed, 7 insertions, 0 deletions
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<CNNLayerParams> params_buffer_;