feat(shaders_lab): DAG pipeline mode with node catalog
- cpp/functions/gfx/dag_types: DagStep, DagNodeDef, DagControl (header-only) - cpp/functions/gfx/dag_catalog: 10 hardcoded nodes (4 gen, 3 op, 3 blend) ported from shader-dag-blends.jsx - cpp/functions/gfx/dag_compile: pipeline → GLSL 330 core with fan-in via source_id - cpp/functions/gfx/dag_uniforms: upload u_params[16] via glUniform4fv - cpp/functions/gfx/dag_panel: ImGui pipeline editor (add/remove/reorder/controls) - main.cpp: Code/DAG mode toggle, per-mode compile path and uniforms - gl_loader: +glUniform4fv - rebuild Windows .exe Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "gfx/dag_types.h"
|
||||
|
||||
namespace fn::gfx {
|
||||
|
||||
// Compila un pipeline DAG a GLSL 330 core completo (listo para gl_shader::compile_fragment).
|
||||
// El preamble de gl_shader ya declara #version, fragColor, u_time, u_resolution, u_mouse.
|
||||
// Este compilador emite uniform vec4 u_params[16], las funciones node_<i> y void main().
|
||||
// Si el pipeline esta vacio, emite un fragment que pinta gris oscuro.
|
||||
std::string compile_dag_to_glsl(const std::vector<DagStep>& pipeline);
|
||||
|
||||
} // namespace fn::gfx
|
||||
Reference in New Issue
Block a user