Rebel Fork Framework
Urho3D::PipelineBatchByState Struct Reference

Scene batch sorted by pipeline state, material and geometry. Also sorted front to back. More...

#include <Urho3D/RenderPipeline/PipelineBatchSortKey.h>

Public Member Functions

 PipelineBatchByState ()=default
 Construct default.
 
 PipelineBatchByState (const PipelineBatch *batch)
 Construct from batch.
 
bool operator< (const PipelineBatchByState &rhs) const
 Compare sorted batches.
 

Public Attributes

unsigned long long primaryKey_ {}
 Primary sorting value.
 
unsigned long long secondaryKey_ {}
 Secondary sorting value.
 
const PipelineBatchpipelineBatch_ {}
 Batch to be sorted.
 

Static Public Attributes

static constexpr unsigned long long PixelLightBits = 8
 
static constexpr unsigned long long LightmapBits = 8
 
static constexpr unsigned long long MaterialBits = 16
 
static constexpr unsigned long long PipelineStateBits = 24
 
static constexpr unsigned long long RenderOrderBits = 8
 
static constexpr unsigned long long PixelLightMask = (1ull << PixelLightBits) - 1
 
static constexpr unsigned long long LightmapMask = (1ull << LightmapBits) - 1
 
static constexpr unsigned long long MaterialMask = (1ull << MaterialBits) - 1
 
static constexpr unsigned long long PipelineStateMask = (1ull << PipelineStateBits) - 1
 
static constexpr unsigned long long RenderOrderMask = (1ull << RenderOrderBits) - 1
 
static constexpr unsigned long long PixelLightOffset = 0
 
static constexpr unsigned long long LightmapOffset = PixelLightOffset + PixelLightBits
 
static constexpr unsigned long long MaterialOffset = LightmapOffset + LightmapBits
 
static constexpr unsigned long long PipelineStateOffset = MaterialOffset + MaterialBits
 
static constexpr unsigned long long RenderOrderOffset = PipelineStateOffset + PipelineStateBits
 
static constexpr unsigned long long ReservedBits = 16
 
static constexpr unsigned long long VertexLightsBits = 24
 
static constexpr unsigned long long GeometryBits = 24
 
static constexpr unsigned long long ReservedMask = (1ull << ReservedBits) - 1
 
static constexpr unsigned long long VertexLightsMask = (1ull << VertexLightsBits) - 1
 
static constexpr unsigned long long GeometryMask = (1ull << GeometryBits) - 1
 
static constexpr unsigned long long ReservedOffset = 0
 
static constexpr unsigned long long VertexLightsOffset = ReservedOffset + ReservedBits
 
static constexpr unsigned long long GeometryOffset = VertexLightsOffset + VertexLightsBits
 

Detailed Description

Scene batch sorted by pipeline state, material and geometry. Also sorted front to back.

Member Data Documentation

◆ PixelLightBits

constexpr unsigned long long Urho3D::PipelineBatchByState::PixelLightBits = 8
staticconstexpr

Primary key layout (from least to most important)

◆ ReservedBits

constexpr unsigned long long Urho3D::PipelineBatchByState::ReservedBits = 16
staticconstexpr

Secondary key layout (from least to most important)


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