Avokadoen / zig_vulkan

Toying with vulkan and zig
45 stars 2 forks source link

test compressing nodes #75

Closed Avokadoen closed 2 years ago

Avokadoen commented 2 years ago

Test representing a node with 32 bits. See if it improves performance in any way

// Size: 8 bytes
// const Node = packed struct{
//  @"type": u32,
//  value: u32,
// }

// Size 4 bytes!
const Node = packed struct{
  @"type": u3,
  value: u29,
}

Glsl: https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/bitfieldExtract.xhtml

Avokadoen commented 2 years ago

Voxels are ~1 bit in brickmap port :)