Files
fn_registry/cpp/functions/gfx/dag_catalog.md
T
egutierrez 5d83c11169 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

1.6 KiB

name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, tested, tests, test_file_path, file_path, params, output
name kind lang domain version purity signature description tags uses_functions uses_types returns returns_optional error_type imports tested tests test_file_path file_path params output
dag_catalog function cpp gfx 1.0.0 pure const std::vector<DagNodeDef>& dag_catalog(); const DagNodeDef* dag_find(const std::string& name) Catalogo global de nodos DAG para el pipeline de shaders. dag_catalog() devuelve referencia estable a los 10 nodos hardcoded (4 gen, 3 op, 3 blend) portados desde shader-dag-blends.jsx. dag_find() busca por nombre.
dag
shader
catalog
nodes
gfx
pipeline
dag_types_cpp_gfx
false
dag_types
string
vector
false
cpp/functions/gfx/dag_catalog.cpp
dag_catalog(): referencia const estable al vector de DagNodeDef (instancia estatica, no se invalida). dag_find(name): puntero al nodo con ese nombre o nullptr si no existe.

Nodos incluidos

Generadores (4)

  • solid: color constante RGB
  • gradient: gradiente direccional con tono
  • plasma: onda trigonometrica animada
  • circle: SDF de circulo con suavizado

Operadores (3)

  • invert: 1 - rgb
  • gamma: correccion gamma pow(rgb, 1/g)
  • hueShift: rotacion de matiz via matriz YIQ

Blends (3)

  • blend_mix: interpolacion mix(a, b, t)
  • blend_multiply: a.rgb * b.rgb
  • blend_screen: 1 - (1-a)(1-b)

Notas

Los cuerpos GLSL omiten las declaraciones de u_time, u_resolution, u_params — las proporciona el preamble de gl_shader::compile_fragment o compile_dag_to_glsl. El indice idx que recibe body_glsl es la posicion en el pipeline (para indexar u_params[idx]).