mirror of
https://github.com/bkaradzic/bimg.git
synced 2026-02-20 22:03:13 +01:00
texturec: Added alpha to coverage mip map generation.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
#include <stdint.h> // uint32_t
|
||||
#include <stdlib.h> // NULL
|
||||
|
||||
#define BIMG_API_VERSION UINT32_C(2)
|
||||
#define BIMG_API_VERSION UINT32_C(3)
|
||||
|
||||
namespace bx
|
||||
{
|
||||
@@ -335,6 +335,12 @@ namespace bimg
|
||||
, const void* _src
|
||||
);
|
||||
|
||||
///
|
||||
PackFn getPack(TextureFormat::Enum _format);
|
||||
|
||||
///
|
||||
UnpackFn getUnpack(TextureFormat::Enum _format);
|
||||
|
||||
///
|
||||
bool imageConvert(
|
||||
TextureFormat::Enum _dstFormat
|
||||
@@ -408,7 +414,7 @@ namespace bimg
|
||||
);
|
||||
|
||||
///
|
||||
void imageWriteTga(
|
||||
int32_t imageWriteTga(
|
||||
bx::WriterI* _writer
|
||||
, uint32_t _width
|
||||
, uint32_t _height
|
||||
@@ -420,7 +426,7 @@ namespace bimg
|
||||
);
|
||||
|
||||
///
|
||||
void imageWriteKtx(
|
||||
int32_t imageWriteKtx(
|
||||
bx::WriterI* _writer
|
||||
, TextureFormat::Enum _format
|
||||
, bool _cubeMap
|
||||
@@ -433,7 +439,7 @@ namespace bimg
|
||||
);
|
||||
|
||||
///
|
||||
void imageWriteKtx(
|
||||
int32_t imageWriteKtx(
|
||||
bx::WriterI* _writer
|
||||
, ImageContainer& _imageContainer
|
||||
, const void* _data
|
||||
|
||||
@@ -79,6 +79,28 @@ namespace bimg
|
||||
, const ImageContainer* _src
|
||||
);
|
||||
|
||||
///
|
||||
float imageAlphaTestCoverage(
|
||||
TextureFormat::Enum _format
|
||||
, uint32_t _width
|
||||
, uint32_t _height
|
||||
, uint32_t _srcPitch
|
||||
, const void* _src
|
||||
, float _alphaRef
|
||||
, float _scale = 1.0f
|
||||
);
|
||||
|
||||
///
|
||||
void imageScaleAlphaToCoverage(
|
||||
TextureFormat::Enum _format
|
||||
, uint32_t _width
|
||||
, uint32_t _height
|
||||
, uint32_t _srcPitch
|
||||
, void* _src
|
||||
, float _coverage
|
||||
, float _alphaRef
|
||||
);
|
||||
|
||||
} // namespace bimg
|
||||
|
||||
#endif // BIMG_ENCODE_H_HEADER_GUARD
|
||||
|
||||
Reference in New Issue
Block a user