MCPcopy Create free account
hub / github.com/defold/defold / unpack_bc3

Function unpack_bc3

engine/dlib/src/basis/encoder/basisu_gpu_texture.cpp:357–367  ·  view source on GitHub ↗

Returns false if the block uses 3-color punchthrough alpha mode, which isn't supported on some GPU's for BC3.

Source from the content-addressed store, hash-verified

355
356 // Returns false if the block uses 3-color punchthrough alpha mode, which isn't supported on some GPU's for BC3.
357 bool unpack_bc3(const void *pBlock_bits, color_rgba *pPixels)
358 {
359 bool success = true;
360
361 if (unpack_bc1((const uint8_t *)pBlock_bits + sizeof(bc4_block), pPixels, true))
362 success = false;
363
364 unpack_bc4(pBlock_bits, &pPixels[0].a, sizeof(color_rgba));
365
366 return success;
367 }
368
369 // writes RG
370 void unpack_bc5(const void *pBlock_bits, color_rgba *pPixels)

Callers 1

unpack_blockFunction · 0.85

Calls 2

unpack_bc1Function · 0.85
unpack_bc4Function · 0.85

Tested by

no test coverage detected