Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
Ecs::PackedTriangle Struct Reference

GPU-ready packed triangle data (matches shader layout). Stores 3 x 8-bit local indices packed into a single uint32_t. Packing: [unused:8][i2:8][i1:8][i0:8] - bits 31-24, 23-16, 15-8, 7-0 This provides 4x bandwidth reduction vs unpacked format. More...

#include <EcsData.h>

Static Public Member Functions

static PackedTriangle pack (uint8_t i0, uint8_t i1, uint8_t i2)
 Pack 3 local indices into a single uint32_t.

Public Attributes

uint32_t packed
 3 x 8-bit indices: (i2 << 16) | (i1 << 8) | i0

Detailed Description

GPU-ready packed triangle data (matches shader layout). Stores 3 x 8-bit local indices packed into a single uint32_t. Packing: [unused:8][i2:8][i1:8][i0:8] - bits 31-24, 23-16, 15-8, 7-0 This provides 4x bandwidth reduction vs unpacked format.

Definition at line 204 of file EcsData.h.

Member Function Documentation

◆ pack()

PackedTriangle Ecs::PackedTriangle::pack ( uint8_t i0,
uint8_t i1,
uint8_t i2 )
inlinestatic

Pack 3 local indices into a single uint32_t.

Definition at line 208 of file EcsData.h.

Referenced by EngineCore::ClusterLodGenerator::generate().

Here is the caller graph for this function:

Member Data Documentation

◆ packed

uint32_t Ecs::PackedTriangle::packed

3 x 8-bit indices: (i2 << 16) | (i1 << 8) | i0

Definition at line 205 of file EcsData.h.


The documentation for this struct was generated from the following file:
  • /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/Ecs/EcsData.h