Render Graph Resource Types Plan¶
Goal¶
Make render graph resources typed enough to represent an FBO as a tuple of attachments, while allowing passes to consume color and depth attachments as sampled textures.
Initial public resource/socket types:
fbo: tuple resource with color attachment and optional depth attachment.color_texture: sampled/view reference to an FBO color attachment.depth_texture: sampled/view reference to an FBO depth attachment.shadow: existing shadow resource type.
FboSplit and FboJoin are compile-time graph nodes. They are not runtime
passes and must not create tc_pass instances.
Implementation Checklist¶
- [x] Add graph utility node definitions.
- [x] Add
termin/render/graph_node_def.hpp. - [x] Add
termin-render/src/graph_node_def.cpp. -
[x] Register boundary/utility node definitions in one C++ source of truth:
resource,external_rt,render_target_input,pipeline_output,output,fbo_split,fbo_join. -
[x] Add resource alias model.
- [x] Add
AttachmentKind,ResourceView, andFboComposition. - [x] Store views/compositions in
ResourceNaming. -
[x] Store views/compositions in
PipelineRenderCachesoRenderEnginecan use the compiled graph metadata. -
[x] Update C++ graph data parsing.
- [x]
GraphData::from_trentmust get boundary/utility sockets from graph node definitions instead of hard-codedif/elsesockets. -
[x] Pass sockets still come from inspect graph metadata.
-
[x] Update graph compilation.
- [x]
is_pass_nodemust treat registered non-executable graph nodes as non-passes. - [x]
assign_resource_namesmust create view aliases forfbo_split:A.color -> {parent=A, attachment=color}andA.depth -> {parent=A, attachment=depth}. - [x]
assign_resource_namesmust create FBO compositions forfbo_join. - [x]
compile_graphmust copy the alias maps intoPipelineRenderCache. -
[x]
FboSplit/FboJoinmust not add resource specs and must not create runtime passes. -
[x] Add type validation.
- [x] Allow same-type connections.
- [x] Require explicit
FboSplit/FboJoinfor conversions betweenfbo,color_texture, anddepth_texture. -
[x] Log/throw compile errors instead of guessing.
-
[x] Update render engine.
- [x] After collecting FBO textures, apply
resource_views. - [x] After views, apply
fbo_compositions. - [x] Do not allocate a new FBO for composed FBO resources.
-
[x] Log
ERRORwhen a view/composition refers to a missing attachment. -
[x] Update UI editors.
- [x] Add
FBO SplitandFBO Joinin tcgui pipeline editor. - [x] Add matching nodes in Qt nodegraph.
-
[x] Both editors must serialize to the same graph format; compilation remains C++ only.
-
[x] Add tests.
- [x] Split creates
color_textureanddepth_textureviews. - [x] Join creates an FBO composition and no runtime pass.
- [x] Split/join nodes do not add resource specs.
- [x] Invalid direct type conversion fails.
- [x]
RenderTargetInput.color -> FboSplit -> FboJoin -> PipelineOutput.colorcompiles through the C++ compiler.