Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
Loading...
Searching...
No Matches
Engine::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 Reduces triangle-index bandwidth by 4x versus unpacked format. More...

#include <EcsData.h>

Static Public Member Functions

static PackedTriangle pack (uint8_t i0, uint8_t i1, uint8_t i2)
 Packs three local triangle indices into one 32-bit value.

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 Reduces triangle-index bandwidth by 4x versus unpacked format.

Definition at line 361 of file EcsData.h.

Member Function Documentation

◆ pack()

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

Packs three local triangle indices into one 32-bit value.

Parameters
i0First local vertex index.
i1Second local vertex index.
i2Third local vertex index.
Returns
Packed triangle using the shader layout documented on PackedTriangle.

Definition at line 371 of file EcsData.h.

Member Data Documentation

◆ packed

uint32_t Engine::Ecs::PackedTriangle::packed

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

Definition at line 362 of file EcsData.h.


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