88 auto hash() const noexcept ->
size_t;
100 auto to_string() const ->
std::
string;
107 float alpha_test_value = 1.0f;
109 math::vec2 tiling{1.0f, 1.0f};
121 uint32_t lod_index = 0;
122 uint32_t submesh_index = 0;
124 std::optional<shadow_cutout_state>
cutout;
132 std::optional<shadow_cutout_state> cutout_state = std::nullopt);
134 auto operator<=>(
const shadow_batch_key& other)
const -> std::strong_ordering;
137 [[nodiscard]]
auto hash() const noexcept ->
size_t;
138 [[nodiscard]] auto is_valid() const ->
bool;
139 [[nodiscard]] auto uses_alpha_cutout() const ->
bool;
140 [[nodiscard]] auto to_string() const ->
std::
string;
144auto make_shadow_batch_key(const
std::shared_ptr<
mesh>& mesh_ptr,
146 uint32_t submesh_index,
Base class for materials used in rendering.
Main class representing a 3D mesh with support for different LODs, submeshes, and skinning.
Hash specialization for batch_key to enable use in std::unordered_map.
cull_type
Enum representing the type of culling to be used.
Thread-safe handle to an asset.
auto operator()(const unravel::batch_key &key) const noexcept -> size_t
auto operator()(const unravel::shadow_batch_key &key) const noexcept -> size_t
Batch key structure for grouping compatible draw calls.
batch_key()=default
Default constructor.
auto hash() const noexcept -> size_t
Generate hash value for this batch key.
auto operator<=>(const batch_key &other) const =default
Three-way comparison operator for sorting and equality.
auto is_valid() const -> bool
Check if this batch key is valid.
std::shared_ptr< material > material_ptr
Shared pointer to the material.
uint32_t lod_index
Level of detail index.
std::shared_ptr< mesh > mesh_ptr
Shared pointer to the mesh geometry.
uint32_t submesh_index
Submesh index within the mesh.
auto operator==(const batch_key &other) const -> bool=default
Equality comparison operator.
Batch key for shadow depth passes — geometry-first, optional cutout bucket.
std::shared_ptr< mesh > mesh_ptr
std::optional< shadow_cutout_state > cutout
shadow_batch_key()=default
Per-draw state for alpha-cutout shadow batches (texture + clip threshold).
std::shared_ptr< gfx::texture > color_map