Skip to content

Single file library for BC6H compression with no external dependencies.

License

Notifications You must be signed in to change notification settings

0xc0de/bc6h_enc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

bc6h_enc

Single file library for BC6H compression with no external dependencies.

Official repository: https://github.com/0xc0de/bc6h_enc

The code is based on BC6HBC7.cpp from DirectXTex and localized into a single header library with no external dependencies.

How to use:

// You can define:
//  for debug logging:
//   #define BC6H_LOG(s) YourPrint(s)
//  for asserts:
//   #define BC6H_ASSERT(expression) YourAssert(expression)
//  to override float<->half packing:
//   #define BC6H_HALF_TO_FLOAT(h) YourImpl(h)
//   #define BC6H_FLOAT_TO_HALF(f) YourImpl(f)
#define BC6H_ENC_IMPLEMENTATION
#include "bc6h_enc.h"

Public interface:

bc6h_enc::DecodeBC6HU(void* pDest, const void* pSrc);
bc6h_enc::DecodeBC6HS(void* pDest, const void* pSrc);
bc6h_enc::EncodeBC6HU(void* pDest, const void* pSrc);
bc6h_enc::EncodeBC6HS(void* pDest, const void* pSrc);

About

Single file library for BC6H compression with no external dependencies.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages