Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
RenderGraph.hpp File Reference

Full-screen passes as a declared graph: what each one reads, what it writes, and at what size — the graph decides the rest. More...

#include "../../core/Types.hpp"
#include "../rhi/Framebuffer.hpp"
#include "../rhi/GfxEnums.hpp"
#include "TargetPool.hpp"
#include <functional>
#include <memory>
#include <string>
#include <unordered_set>
#include <vector>
Include dependency graph for RenderGraph.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  esengine::rg::TargetDesc
 Shape of a target the graph allocates. More...
struct  esengine::rg::PassContext
struct  esengine::rg::PassDesc
 One full-screen pass. More...
class  esengine::rg::PassTimer
 A frame's full-screen passes, compiled and run. More...
struct  esengine::rg::PassTimer::Entry
class  esengine::rg::RenderGraph

Namespaces

namespace  esengine
namespace  esengine::rg

Typedefs

using esengine::rg::ResourceId = u32

Variables

constexpr ResourceId esengine::rg::kNoResource = static_cast<ResourceId>(-1)

Detailed Description

Full-screen passes as a declared graph: what each one reads, what it writes, and at what size — the graph decides the rest.

The chain it replaces was two fixed framebuffers ping-ponged in order, which fixes three things it should not: every pass runs at full resolution, a pass can only read the one before it (plus the scene, wired to a hard-coded unit), and a disabled pass still costs its target. Here a pass names its inputs and its output's SCALE, so a blur chain runs at a quarter size, a composite reads both the blur and the scene, and a pass nothing reaches is never run.

Physical targets come from a pool keyed by shape and handed back the moment a resource is last read, so the two-buffer ping-pong is what the allocator does on its own for a linear chain rather than something the caller arranges.

The graph does NOT own scene geometry: the scene is rendered into an imported texture by the frame, and the graph runs over it. See PostProcessPipeline.

Definition in file RenderGraph.hpp.