vrendergraph is a tiny data-driven render pipeline layer that builds a runtime FrameGraph from JSON.
Goals:
- Keep the runtime builder minimal and deterministic (execute passes in
passes[]order). - Pass IO is described via
inputs/outputsslot maps. - Optional
metafield stores editor/tool UI state (node positions, zoom/pan, etc.) and is ignored by runtime.
vrendergraph supports the legacy v0.2 shape and the v0.3 schema. v0.2
keeps slot connections as plain strings and resources as an external-resource
array:
{
"resources": ["backbuffer"],
"passes": [
{
"id": "present",
"type": "present",
"inputs": {
"color": "tone_mapping.ldr",
"backbuffer": "backbuffer"
}
}
]
}v0.3 adds explicit schema versioning, resource descriptors, pass conditions,
view modes, and object-style resource references with selectors. Selectors are
opaque to vrendergraph; engines can interpret fields such as view, time,
mip, layer, or access.
{
"version": 3,
"resources": {
"backbuffer": {
"imported": true,
"type": "texture",
"extent": "swapchain",
"format": "RGBA8"
},
"scene_color": {
"type": "texture",
"extent": "view",
"format": "RGBA16F",
"view": "inherit",
"history": { "frames": 2 }
}
},
"passes": [
{
"id": "taa",
"type": "taa",
"when": "xr || non_xr",
"viewMode": "inherit",
"inputs": {
"current": { "resource": "scene_color", "view": "current", "time": "current" },
"history": { "resource": "scene_color", "view": "current", "time": "previous" }
},
"outputs": {
"color": { "resource": "taa.color", "view": "current", "time": "current" }
}
}
],
"meta": {
"editor": {
"nodes": {
"taa": { "pos": [0.0, 0.0] }
}
}
}
}Notes:
passes[]is required.resourcesis optional.- v0.2 string refs are preserved and serialize as compact strings when no selector is present.
- v0.3 object refs serialize selector fields next to
resourcefor readability. when,viewMode, resource desc fields, and selectors are intentionally engine-defined;vrendergraphstores them and passes resource descriptors to the importer.meta{}is optional and intended for tools.
Example files:
examples/deferred_virtual/scene.v02.jsonexamples/deferred_virtual/scene.v03.jsonexamples/editor/scene.v03.json
vrendergraph_editor.hpp provides header-only helpers to read/write editor UI state
into RenderGraphDesc::meta.
imgui.h and imnodes are needed.
This project is under the MIT license.
