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 --- tools/seq_compiler.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tools') diff --git a/tools/seq_compiler.cc b/tools/seq_compiler.cc index 069122a..daf1294 100644 --- a/tools/seq_compiler.cc +++ b/tools/seq_compiler.cc @@ -1109,6 +1109,21 @@ int main(int argc, char* argv[]) { << ");\n"; out_file << " }\n"; } + } else if (!eff.params.empty() && eff.class_name == "CNNv2Effect") { + // Generate parameter struct initialization for CNNv2Effect + out_file << " {\n"; + out_file << " CNNv2EffectParams p;\n"; + + for (const auto& [key, value] : eff.params) { + if (key == "blend") { + out_file << " p.blend_amount = " << value << "f;\n"; + } + } + + out_file << " seq->add_effect(std::make_shared<" + << eff.class_name << ">(ctx, p), " << eff.start << "f, " + << eff.end << "f, " << eff.priority << ");\n"; + out_file << " }\n"; } else { // No parameters or unsupported effect - use default constructor out_file << " seq->add_effect(std::make_shared<" << eff.class_name -- cgit v1.2.3