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,46 @@
|
||||
---
|
||||
name: dag_catalog
|
||||
kind: function
|
||||
lang: cpp
|
||||
domain: gfx
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "const std::vector<DagNodeDef>& dag_catalog(); const DagNodeDef* dag_find(const std::string& name)"
|
||||
description: "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."
|
||||
tags: [dag, shader, catalog, nodes, gfx, pipeline]
|
||||
uses_functions: []
|
||||
uses_types:
|
||||
- dag_types_cpp_gfx
|
||||
returns: []
|
||||
returns_optional: false
|
||||
error_type: ""
|
||||
imports: [dag_types, string, vector]
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
file_path: "cpp/functions/gfx/dag_catalog.cpp"
|
||||
params: []
|
||||
output: "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]).
|
||||
Reference in New Issue
Block a user