refactor: consolidate render graph architecture

Amp-Thread-ID: https://ampcode.com/threads/T-019f9d91-77c1-7206-a60f-ed6554ce92ab

Co-authored-by: Heaust Azure <heaust.azure@gmail.com>
This commit is contained in:
Amp
2026-07-27 21:11:54 +00:00
co-authored by heaust
parent 05311e564c
commit fc8c16daec
25 changed files with 4907 additions and 7711 deletions
+6 -13
View File
@@ -7,7 +7,7 @@ import {
midnight,
renderGraphPresets,
} from "../static/render-graph/presets.js";
test("Phase 4 unit 4 presets preserve V1 graphs and add the V2 HDR fullscreen topology", () => {
test("presets use canonical node graphs", () => {
assert.deepEqual(Object.keys(renderGraphPresets), [
"midnight",
"ember",
@@ -22,20 +22,13 @@ test("Phase 4 unit 4 presets preserve V1 graphs and add the V2 HDR fullscreen to
[midnight.graphId, ember.graphId],
["preset_midnight", "preset_ember"],
);
assert.notDeepEqual(
midnight.passes[0].writes[0].access.load.value,
ember.passes[0].writes[0].access.load.value,
);
assert.notDeepEqual(midnight.nodes[6].parameters.clearColor, ember.nodes[6].parameters.clearColor);
for (const graph of [midnight, ember]) {
assert.equal(graph.schemaVersion, 1);
assert.equal(graph.schemaVersion, 2);
assert.equal(graph.revision, 1);
assert.equal(graph.passes.length, 1);
assert.equal(graph.passes[0].state, "enabled");
assert.deepEqual(graph.passes[0].executor, {
key: "scene_forward",
version: 1,
});
assert.equal(graph.outputs[0].name, "present");
assert.equal(graph.nodes[6].executor.key, "legacy_forward");
assert.deepEqual(graph.nodes[6].inputs.colorTarget, { node: "surface", socket: "surface" });
assert.equal(graph.nodes.at(-1).executor.key, "present");
}
assert.equal(hdr.schemaVersion, 2);
assert.equal(hdr.revision, 1);