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

Immutable description of a draw pipeline. Equality keys the pipeline cache, so two draws with the same description share one PipelineHandle. More...

#include <PipelineState.hpp>

Public Member Functions

bool operator== (const PipelineDesc &) const =default

Public Attributes

ShaderHandle program = ShaderHandle::Invalid
VertexLayoutHandle vertexLayout = VertexLayoutHandle::Invalid
BlendMode blend = BlendMode::Normal
bool blendEnabled = true
bool depthTest = false
bool depthWrite = false
GfxStencilMode stencil = GfxStencilMode::Off
bool cullEnabled = false
bool cullFront = false
i16 depthBias = 0
bool alphaToCoverage = false
GfxTopology topology = GfxTopology::Triangles
bool gbuffer = false
bool albedo = false
bool colorWrite = true
 False writes no colour, to either attachment: a depth-only pass, whose surfaces are then drawn again with colour.
bool depthEqual = false
bool layerAlpha = false

Detailed Description

Immutable description of a draw pipeline. Equality keys the pipeline cache, so two draws with the same description share one PipelineHandle.

Definition at line 61 of file PipelineState.hpp.

Member Function Documentation

◆ operator==()

bool esengine::PipelineDesc::operator== ( const PipelineDesc & ) const
default

Member Data Documentation

◆ albedo

bool esengine::PipelineDesc::albedo = false

With gbuffer: the shader also writes the surface's diffuse colour (location 2) into the target's third attachment. A gbuffer shader that predates it writes two outputs and leaves the third alone.

Definition at line 85 of file PipelineState.hpp.

Referenced by esengine::GLDevice::backendSetPipeline(), and esengine::DrawList::execute().

◆ alphaToCoverage

bool esengine::PipelineDesc::alphaToCoverage = false

Output alpha becomes multisample coverage (a cutout's feathered edge). Only meaningful on an opaque draw into a multisampled target; ignored elsewhere.

Definition at line 77 of file PipelineState.hpp.

Referenced by esengine::GLDevice::backendSetPipeline(), and esengine::DrawList::execute().

◆ blend

◆ blendEnabled

bool esengine::PipelineDesc::blendEnabled = true

◆ colorWrite

bool esengine::PipelineDesc::colorWrite = true

False writes no colour, to either attachment: a depth-only pass, whose surfaces are then drawn again with colour.

Definition at line 87 of file PipelineState.hpp.

Referenced by esengine::GLDevice::backendSetPipeline(), and esengine::DrawList::execute().

◆ cullEnabled

bool esengine::PipelineDesc::cullEnabled = false

◆ cullFront

bool esengine::PipelineDesc::cullFront = false

◆ depthBias

i16 esengine::PipelineDesc::depthBias = 0

How far toward the eye this surface is pushed, in units of the depth buffer's resolution — the only way to say which of two COPLANAR surfaces wins. Drives both the constant and the slope-scaled term.

Definition at line 74 of file PipelineState.hpp.

Referenced by esengine::GLDevice::backendSetPipeline(), esengine::DrawList::execute(), and esengine::webgpu::toWGPUDepthStencil().

◆ depthEqual

bool esengine::PipelineDesc::depthEqual = false

Passes where the depth is EQUAL to what the buffer holds, not only where it is less: a surface drawn a second time, after a pass that wrote its depth, must land on itself.

Definition at line 90 of file PipelineState.hpp.

Referenced by esengine::GLDevice::backendSetPipeline(), esengine::DrawList::execute(), and esengine::webgpu::toWGPUDepthStencil().

◆ depthTest

◆ depthWrite

◆ gbuffer

bool esengine::PipelineDesc::gbuffer = false

The shader writes a second colour output (location 1) and the target's second attachment is to receive it. A pipeline without it draws into a target that has one and leaves it alone: WebGPU wants that said in the pipeline, and GL wants the draw buffers set to match.

Definition at line 82 of file PipelineState.hpp.

Referenced by esengine::GLDevice::backendSetPipeline(), and esengine::DrawList::execute().

◆ layerAlpha

bool esengine::PipelineDesc::layerAlpha = false

◆ program

◆ stencil

◆ topology

GfxTopology esengine::PipelineDesc::topology = GfxTopology::Triangles

◆ vertexLayout


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