|
Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
|
One full-screen pass. More...
#include <RenderGraph.hpp>
Public Attributes | |
| std::string | name |
| std::vector< ResourceId > | reads |
| std::vector< ResourceId > | dependencies |
| Resources the pass uses but the graph must not bind. | |
| ResourceId | write = kNoResource |
| bool | compute = false |
| A compute pass: no render pass is opened and no unit is bound — execute dispatches, reading ctx.input(i) and writing ctx.output, which has to be a target declared with storage. Ordered, culled and recycled like any pass. | |
| bool | keep = false |
| Wanted by a later frame rather than by this picture: not culled for nothing having read it yet. | |
| bool | discardDepth = false |
| Its target's depth is only for testing while it draws, and nothing reads it afterwards (see RenderPassDesc::discardDepth). | |
| bool | clear = false |
| bool | clearDepth = false |
| f32 | clearColor [4] = {0.0f, 0.0f, 0.0f, 1.0f} |
| bool | clearViewportOnly = false |
| u32 | viewportX = 0 |
| The rect of its target this pass draws into. Zero width = all of it. | |
| u32 | viewportY = 0 |
| u32 | viewportW = 0 |
| u32 | viewportH = 0 |
| std::function< void(const PassContext &)> | execute |
| bool | asyncCompute = false |
| The compute callback only accesses the graph resources it declares and private uniforms. | |
| AsyncComputePriority | computePriority = AsyncComputePriority::Default |
One full-screen pass.
reads are bound to texture units in declaration order, so a pass that wants the scene as its second sampler declares it second — the wiring is the declaration, not a convention the shader has to know.
Definition at line 95 of file RenderGraph.hpp.
| bool esengine::rg::PassDesc::asyncCompute = false |
The compute callback only accesses the graph resources it declares and private uniforms.
Definition at line 140 of file RenderGraph.hpp.
Referenced by esengine::rg::RenderGraph::execute().
| bool esengine::rg::PassDesc::clear = false |
Definition at line 117 of file RenderGraph.hpp.
Referenced by esengine::RenderFrame::drawOverScreen(), esengine::RenderFrame::end(), esengine::RenderFrame::endScreenOverlay(), and esengine::rg::RenderGraph::execute().
| f32 esengine::rg::PassDesc::clearColor[4] = {0.0f, 0.0f, 0.0f, 1.0f} |
Definition at line 122 of file RenderGraph.hpp.
Referenced by esengine::RenderFrame::end(), esengine::RenderFrame::endScreenOverlay(), and esengine::rg::RenderGraph::execute().
| bool esengine::rg::PassDesc::clearDepth = false |
Clears the depth attachment with the colour, for a target that has one. A geometry pass writes depth, so the frame before it is not what it should be tested against; a fullscreen pass has neither and ignores this.
Definition at line 121 of file RenderGraph.hpp.
Referenced by esengine::RenderFrame::end(), esengine::RenderFrame::endScreenOverlay(), and esengine::rg::RenderGraph::execute().
| bool esengine::rg::PassDesc::clearViewportOnly = false |
The clears reach only the viewport rect below and leave the rest of the target as it was: a pass that redraws one part of a target kept from frame to frame (one square of the shadow atlas).
Definition at line 125 of file RenderGraph.hpp.
Referenced by esengine::rg::RenderGraph::execute().
| bool esengine::rg::PassDesc::compute = false |
A compute pass: no render pass is opened and no unit is bound — execute dispatches, reading ctx.input(i) and writing ctx.output, which has to be a target declared with storage. Ordered, culled and recycled like any pass.
Definition at line 112 of file RenderGraph.hpp.
Referenced by esengine::DynamicGI::declare(), esengine::VoxelGI::declare(), and esengine::rg::RenderGraph::execute().
| AsyncComputePriority esengine::rg::PassDesc::computePriority = AsyncComputePriority::Default |
Definition at line 141 of file RenderGraph.hpp.
Referenced by esengine::rg::RenderGraph::execute().
| std::vector<ResourceId> esengine::rg::PassDesc::dependencies |
Resources the pass uses but the graph must not bind.
A scene pass reaches the shadow atlas through the material each draw carries, so it owes the graph ordering but must not spend a unit — as a read it would claim unit 0 from under the batch. Culling counts it either way: a producer nothing names is dropped.
Definition at line 106 of file RenderGraph.hpp.
Referenced by esengine::DynamicGI::declare(), esengine::VoxelGI::declare(), esengine::RenderFrame::end(), and esengine::rg::RenderGraph::execute().
| bool esengine::rg::PassDesc::discardDepth = false |
Its target's depth is only for testing while it draws, and nothing reads it afterwards (see RenderPassDesc::discardDepth).
Definition at line 116 of file RenderGraph.hpp.
Referenced by esengine::rg::RenderGraph::execute().
| std::function<void(const PassContext&)> esengine::rg::PassDesc::execute |
Definition at line 138 of file RenderGraph.hpp.
Referenced by esengine::DynamicGI::declare(), esengine::VoxelGI::declare(), esengine::RenderFrame::drawOverScreen(), esengine::RenderFrame::end(), esengine::RenderFrame::endScreenOverlay(), and esengine::rg::RenderGraph::execute().
| bool esengine::rg::PassDesc::keep = false |
Wanted by a later frame rather than by this picture: not culled for nothing having read it yet.
Definition at line 114 of file RenderGraph.hpp.
| std::string esengine::rg::PassDesc::name |
Definition at line 96 of file RenderGraph.hpp.
Referenced by esengine::DynamicGI::declare(), esengine::VoxelGI::declare(), esengine::RenderFrame::drawOverScreen(), esengine::RenderFrame::end(), esengine::RenderFrame::endScreenOverlay(), and esengine::rg::RenderGraph::execute().
| std::vector<ResourceId> esengine::rg::PassDesc::reads |
Definition at line 97 of file RenderGraph.hpp.
Referenced by esengine::DynamicGI::declare(), esengine::VoxelGI::declare(), esengine::RenderFrame::end(), and esengine::rg::RenderGraph::execute().
| u32 esengine::rg::PassDesc::viewportH = 0 |
Definition at line 137 of file RenderGraph.hpp.
Referenced by esengine::RenderFrame::drawOverScreen(), esengine::RenderFrame::end(), esengine::RenderFrame::endScreenOverlay(), and esengine::rg::RenderGraph::execute().
| u32 esengine::rg::PassDesc::viewportW = 0 |
Definition at line 136 of file RenderGraph.hpp.
Referenced by esengine::RenderFrame::drawOverScreen(), esengine::RenderFrame::end(), esengine::RenderFrame::endScreenOverlay(), and esengine::rg::RenderGraph::execute().
| u32 esengine::rg::PassDesc::viewportX = 0 |
The rect of its target this pass draws into. Zero width = all of it.
Opening a render pass resets the viewport, so a pass that does not cover its whole target has to carry the rect: a fullscreen effect always covers its own, a camera's scene covers whatever slice of a shared target that camera was given.
Definition at line 134 of file RenderGraph.hpp.
Referenced by esengine::RenderFrame::drawOverScreen(), esengine::RenderFrame::end(), esengine::RenderFrame::endScreenOverlay(), and esengine::rg::RenderGraph::execute().
| u32 esengine::rg::PassDesc::viewportY = 0 |
Definition at line 135 of file RenderGraph.hpp.
Referenced by esengine::RenderFrame::drawOverScreen(), esengine::RenderFrame::end(), esengine::RenderFrame::endScreenOverlay(), and esengine::rg::RenderGraph::execute().
| ResourceId esengine::rg::PassDesc::write = kNoResource |
Definition at line 107 of file RenderGraph.hpp.
Referenced by esengine::DynamicGI::declare(), esengine::VoxelGI::declare(), esengine::RenderFrame::drawOverScreen(), esengine::RenderFrame::end(), esengine::RenderFrame::endScreenOverlay(), and esengine::rg::RenderGraph::execute().