feat(shaders_lab): visual node editor (imgui-node-editor) + multi-source

- cpp/vendor/imgui-node-editor: vendorized thedmd/imgui-node-editor v0.9.4
- cpp/functions/gfx/dag_node_editor: new visual pipeline editor replacing dag_panel
- DagStep: source_ids[4] + editor_pos + editor_uid (multi-input support)
- DagNodeDef: num_inputs explicit; circle reclassified as Op
- dag_compile: N inputs per node, topological ordering preserved
- main: use node editor; destroy on shutdown
- patch imgui_extra_math.inl: guard operator*(float, ImVec2) for imgui >= 18955

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-24 21:55:43 +02:00
parent bf5011de93
commit 88fca7b128
89 changed files with 22289 additions and 41 deletions
+4 -4
View File
@@ -76,7 +76,7 @@ bool dag_panel(std::vector<DagStep>& pipeline) {
step.params = def.param_defaults;
if (def.kind == DagKind::Blend && !pipeline.empty()) {
int src = std::max(0, static_cast<int>(pipeline.size()) - 2);
step.source_id = pipeline[static_cast<size_t>(src)].id;
step.source_ids[1] = pipeline[static_cast<size_t>(src)].id;
}
pipeline.push_back(step);
changed = true;
@@ -146,9 +146,9 @@ bool dag_panel(std::vector<DagStep>& pipeline) {
}
int current_src = std::max(0, i - 2);
if (!step.source_id.empty()) {
if (!step.source_ids[1].empty()) {
for (int j = 0; j < i; ++j) {
if (pipeline[static_cast<size_t>(j)].id == step.source_id) {
if (pipeline[static_cast<size_t>(j)].id == step.source_ids[1]) {
current_src = j;
break;
}
@@ -161,7 +161,7 @@ bool dag_panel(std::vector<DagStep>& pipeline) {
int sel = current_src;
if (ImGui::Combo("Source", &sel, items.data(), static_cast<int>(items.size()))) {
if (sel >= 0 && sel < i) {
step.source_id = pipeline[static_cast<size_t>(sel)].id;
step.source_ids[1] = pipeline[static_cast<size_t>(sel)].id;
changed = true;
}
}