Files
fn_registry/cpp/functions/gfx/dag_compile.h
T
egutierrez e115c2e3fd 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>
2026-04-24 21:15:21 +02:00

15 lines
539 B
C++

#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