Skip to main content

Module aos

Module aos 

Source

Structs§

AosLayout
MaterialLayout implementation that packs each material into a single contiguous byte blob (array-of-structs) via pack(), grouping materials by their packed size into separate buckets - materials using different strategies with different field sets don’t have to share a stride.

Functions§

compute_layout
Computes std430-compatible byte offsets for fields, in order, and the total size of the packed struct, rounded up to a 16-byte multiple as std430 requires for a struct used as an SSBO array element.
pack
Packs values (in the same order as fields) into a single contiguous byte buffer using std430 layout rules (array-of-structs).