diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-12 15:10:17 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-12 15:10:17 +0100 |
| commit | 8b30cadfc19647487986d14dba9ddba7908dd1d0 (patch) | |
| tree | f865b42945f72bfc480e2c2a6849127bf56d1a59 /tools/seq_compiler.cc | |
| parent | 1effb125973ac0948de3015be1d53ae72463858b (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 'tools/seq_compiler.cc')
| -rw-r--r-- | tools/seq_compiler.cc | 15 |
1 files changed, 15 insertions, 0 deletions
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 |
