Unravel Engine C++ Reference
Loading...
Searching...
No Matches
unravel::shadow_batch_key Struct Reference

Batch key for shadow depth passes — geometry-first, optional cutout bucket. More...

#include <batch_key.h>

Public Member Functions

 shadow_batch_key ()=default
 
 shadow_batch_key (std::shared_ptr< mesh > mesh, uint32_t lod, uint32_t submesh, cull_type cull_type, std::optional< shadow_cutout_state > cutout_state=std::nullopt)
 
auto operator<=> (const shadow_batch_key &other) const -> std::strong_ordering
 
auto operator== (const shadow_batch_key &other) const -> bool
 
auto hash () const noexcept -> size_t
 
auto is_valid () const -> bool
 
auto uses_alpha_cutout () const -> bool
 
auto to_string () const -> std::string
 

Public Attributes

std::shared_ptr< meshmesh_ptr
 
uint32_t lod_index = 0
 
uint32_t submesh_index = 0
 
cull_type cull = cull_type::counter_clockwise
 
std::optional< shadow_cutout_statecutout
 

Detailed Description

Batch key for shadow depth passes — geometry-first, optional cutout bucket.

Opaque shadows batch on (mesh, lod, submesh, cull). Alpha-cutout shadows additionally split on shadow_cutout_state so instances sharing the same clip texture/threshold batch.

Definition at line 118 of file batch_key.h.

Constructor & Destructor Documentation

◆ shadow_batch_key() [1/2]

unravel::shadow_batch_key::shadow_batch_key ( )
default

◆ shadow_batch_key() [2/2]

unravel::shadow_batch_key::shadow_batch_key ( std::shared_ptr< mesh > mesh,
uint32_t lod,
uint32_t submesh,
cull_type cull_type,
std::optional< shadow_cutout_state > cutout_state = std::nullopt )

Definition at line 63 of file batch_key.cpp.

Member Function Documentation

◆ hash()

auto unravel::shadow_batch_key::hash ( ) const -> size_t
nodiscardnoexcept

Definition at line 164 of file batch_key.cpp.

◆ is_valid()

auto unravel::shadow_batch_key::is_valid ( ) const -> bool
nodiscard

Definition at line 186 of file batch_key.cpp.

◆ operator<=>()

auto unravel::shadow_batch_key::operator<=> ( const shadow_batch_key & other) const -> std::strong_ordering

Definition at line 138 of file batch_key.cpp.

◆ operator==()

auto unravel::shadow_batch_key::operator== ( const shadow_batch_key & other) const -> bool

Definition at line 159 of file batch_key.cpp.

◆ to_string()

auto unravel::shadow_batch_key::to_string ( ) const -> std::string
nodiscard

Definition at line 196 of file batch_key.cpp.

◆ uses_alpha_cutout()

auto unravel::shadow_batch_key::uses_alpha_cutout ( ) const -> bool
nodiscard

Definition at line 191 of file batch_key.cpp.

Member Data Documentation

◆ cull

cull_type unravel::shadow_batch_key::cull = cull_type::counter_clockwise

Definition at line 123 of file batch_key.h.

◆ cutout

std::optional<shadow_cutout_state> unravel::shadow_batch_key::cutout

Definition at line 124 of file batch_key.h.

◆ lod_index

uint32_t unravel::shadow_batch_key::lod_index = 0

Definition at line 121 of file batch_key.h.

◆ mesh_ptr

std::shared_ptr<mesh> unravel::shadow_batch_key::mesh_ptr

Definition at line 120 of file batch_key.h.

◆ submesh_index

uint32_t unravel::shadow_batch_key::submesh_index = 0

Definition at line 122 of file batch_key.h.


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