Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
esengine::PostProcessPass Struct Reference

Post-processing pass configuration. More...

#include <PostProcessPipeline.hpp>

Public Attributes

std::string name
resource::ShaderHandle shader
bool enabled = true
std::unordered_map< std::string, f32 > floatUniforms
std::unordered_map< std::string, glm::vec4 > vec4Uniforms
std::vector< std::pair< std::string, u32 > > textureUniforms
bool temporal = false
bool feedback = false
u64 historyKey = 0
 Which remembered state the pass uses, resolved when the chain is declared.
f32 scale = 1.0f
bool continuesEffect = false
std::vector< std::pair< std::string, rg::ResourceId > > earlierInputs
ComputeHandle compute = ComputeHandle::Invalid
bool isCompute = false
bool usesComputeDepth = false
std::string nativeKind
 A pass the engine implements itself, in compute passes of its own (see VoxelGI): its name, empty for every other pass.
std::vector< std::string > computeParams
u32 workgroupX = 8
u32 workgroupY = 8
std::vector< u8 > paramBytes
BufferHandle paramUbo = BufferHandle::Invalid
u32 paramUboBytes = 0
 The size paramUbo was made with: what lets the next chain's pass of the same size take it over.
bool paramDirty = true

Detailed Description

Post-processing pass configuration.

Definition at line 59 of file PostProcessPipeline.hpp.

Member Data Documentation

◆ compute

ComputeHandle esengine::PostProcessPass::compute = ComputeHandle::Invalid

A compute pass (see PostProcessPipeline::addComputePass): the program, which floats its params block holds, in order, and the workgroup the shader declares. Invalid for every pass that draws.

Definition at line 98 of file PostProcessPipeline.hpp.

Referenced by esengine::PostProcessPipeline::addComputePass().

◆ computeParams

std::vector<std::string> esengine::PostProcessPass::computeParams

◆ continuesEffect

bool esengine::PostProcessPass::continuesEffect = false

Set on every pass of a multi-pass effect after its first: unit 1 then reads the input that effect started from, not this pass's own input. False starts an effect, so a single-pass effect sees the chain as it reached it.

Definition at line 89 of file PostProcessPipeline.hpp.

◆ earlierInputs

std::vector<std::pair<std::string, rg::ResourceId> > esengine::PostProcessPass::earlierInputs

What this pass reads from passes earlier in its own effect: a texture param named u_pass_<name> is the output of the pass called <name> (a bloom's upsample adds the downsample of its own size back). Resolved by the chain each frame, which also keeps those targets alive until this pass has run.

Definition at line 94 of file PostProcessPipeline.hpp.

◆ enabled

◆ feedback

bool esengine::PostProcessPass::feedback = false

Set instead of temporal when the shader declares u_feedback: the pass keeps its own last output without shifting the picture, and reads it there. An auto-exposure's adapted value is remembered this way.

Definition at line 77 of file PostProcessPipeline.hpp.

◆ floatUniforms

◆ historyKey

u64 esengine::PostProcessPass::historyKey = 0

Which remembered state the pass uses, resolved when the chain is declared.

Definition at line 79 of file PostProcessPipeline.hpp.

◆ isCompute

bool esengine::PostProcessPass::isCompute = false

◆ name

◆ nativeKind

std::string esengine::PostProcessPass::nativeKind

A pass the engine implements itself, in compute passes of its own (see VoxelGI): its name, empty for every other pass.

Definition at line 102 of file PostProcessPipeline.hpp.

Referenced by esengine::PostProcessPipeline::addNativePass().

◆ paramBytes

std::vector<u8> esengine::PostProcessPass::paramBytes

#pragma-param shaders: the pass's packed MaterialConstants payload + its UBO (binding 1) — the same reflected block a material would use. Rebuilt from float/vec4Uniforms over the layout defaults when dirty.

Definition at line 110 of file PostProcessPipeline.hpp.

◆ paramDirty

bool esengine::PostProcessPass::paramDirty = true

◆ paramUbo

BufferHandle esengine::PostProcessPass::paramUbo = BufferHandle::Invalid

◆ paramUboBytes

u32 esengine::PostProcessPass::paramUboBytes = 0

The size paramUbo was made with: what lets the next chain's pass of the same size take it over.

Definition at line 113 of file PostProcessPipeline.hpp.

◆ scale

f32 esengine::PostProcessPass::scale = 1.0f

Fraction of the chain's size this pass draws at; the pass consuming it upsamples. The graph resolves the fraction, and u_viewport still reports the CANVAS, so a fractional pass must read its extent off its texture.

Definition at line 84 of file PostProcessPipeline.hpp.

◆ shader

◆ temporal

bool esengine::PostProcessPass::temporal = false

Set by the chain when the pass keeps its output for the next frame (its shader declares u_history); the pass then reads the previous frame there.

Definition at line 73 of file PostProcessPipeline.hpp.

◆ textureUniforms

std::vector<std::pair<std::string, u32> > esengine::PostProcessPass::textureUniforms

Effect-declared textures (LUTs, masks): sampler uniform name -> GL texture id. #pragma-param shaders bind them at their reflected material units; the legacy loose path binds in order above the two engine units (0 = input, 1 = scene).

Definition at line 69 of file PostProcessPipeline.hpp.

Referenced by esengine::PostProcessPipeline::setPassTexture().

◆ usesComputeDepth

bool esengine::PostProcessPass::usesComputeDepth = false

◆ vec4Uniforms

std::unordered_map<std::string, glm::vec4> esengine::PostProcessPass::vec4Uniforms

◆ workgroupX

u32 esengine::PostProcessPass::workgroupX = 8

◆ workgroupY

u32 esengine::PostProcessPass::workgroupY = 8

The documentation for this struct was generated from the following file: