Texture2_CompressBasisEx.
If you only want default values, use Texture2_CompressBasis. Here, at a minimum you must initialize the structure as follows:
ktxBasisParams params = {0};
params.structSize = sizeof(params);
params.compressionLevel = KTX_ETC1S_DEFAULT_COMPRESSION_LEVEL;
compressionLevel has to be explicitly set because 0 is a valid compressionLevel but is not the default used by the BasisU encoder
when no value is set. Only the other settings that are to be non-default must be non-zero.
struct ktxBasisParams {
ktx_uint32_t structSize;
ktx_bool_t uastc;
ktx_bool_t verbose;
ktx_bool_t noSSE;
ktx_uint32_t threadCount;
ktx_uint32_t compressionLevel;
ktx_uint32_t qualityLevel;
ktx_uint32_t maxEndpoints;
float endpointRDOThreshold;
ktx_uint32_t maxSelectors;
float selectorRDOThreshold;
char inputSwizzle[4];
ktx_bool_t normalMap;
ktx_bool_t separateRGToRGB_A;
ktx_bool_t preSwizzle;
ktx_bool_t noEndpointRDO;
ktx_bool_t noSelectorRDO;
ktx_pack_uastc_flags uastcFlags;
ktx_bool_t uastcRDO;
float uastcRDOQualityScalar;
ktx_uint32_t uastcRDODictSize;
float uastcRDOMaxSmoothBlockErrorScale;
float uastcRDOMaxSmoothBlockStdDev;
ktx_bool_t uastcRDODontFavorSimplerModes;
ktx_bool_t uastcRDONoMultithreading;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | ktxBasisParams.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | COMPRESSIONLEVEL
The struct member offsets. |
| public static final int | ENDPOINTRDOTHRESHOLD
The struct member offsets. |
| public static final int | INPUTSWIZZLE
The struct member offsets. |
| public static final int | MAXENDPOINTS
The struct member offsets. |
| public static final int | MAXSELECTORS
The struct member offsets. |
| public static final int | NOENDPOINTRDO
The struct member offsets. |
| public static final int | NORMALMAP
The struct member offsets. |
| public static final int | NOSELECTORRDO
The struct member offsets. |
| public static final int | NOSSE
The struct member offsets. |
| public static final int | PRESWIZZLE
The struct member offsets. |
| public static final int | QUALITYLEVEL
The struct member offsets. |
| public static final int | SELECTORRDOTHRESHOLD
The struct member offsets. |
| public static final int | SEPARATERGTORGB_A
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| public static final int | STRUCTSIZE
The struct member offsets. |
| public static final int | THREADCOUNT
The struct member offsets. |
| public static final int | UASTC
The struct member offsets. |
| public static final int | UASTCFLAGS
The struct member offsets. |
| public static final int | UASTCRDO
The struct member offsets. |
| public static final int | UASTCRDODICTSIZE
The struct member offsets. |
| public static final int | UASTCRDODONTFAVORSIMPLERMODES
The struct member offsets. |
| public static final int | UASTCRDOMAXSMOOTHBLOCKERRORSCALE
The struct member offsets. |
| public static final int | UASTCRDOMAXSMOOTHBLOCKSTDDEV
The struct member offsets. |
| public static final int | UASTCRDONOMULTITHREADING
The struct member offsets. |
| public static final int | UASTCRDOQUALITYSCALAR
The struct member offsets. |
| public static final int | VERBOSE
The struct member offsets. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | ktxBasisParams(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public static ktxBasisParams | |
| public static ktxBasisParams. | calloc(int
the buffer capacity capacity)Returns a new |
| public static ktxBasisParams | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static ktxBasisParams. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public int | |
| public ktxBasisParams | |
| protected ktxBasisParams | create(long
the struct memory address address, ByteBuffer an optional container buffer, to be referenced strongly by the struct instance. container)Implements abstract org. the constructor, but returns the exact type of the Struct subclass.
|
| public static ktxBasisParams | |
| public static ktxBasisParams | |
| public static ktxBasisParams. | create(int
the buffer capacity capacity)Returns a new |
| public static ktxBasisParams. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static ktxBasisParams | |
| public static ktxBasisParams. | |
| public float | |
| public ktxBasisParams | |
| public ByteBuffer | |
| public byte | |
| public ktxBasisParams | |
| public ktxBasisParams | inputSwizzle(int index, byte value)
Sets the specified value at the specified index of the |
| public static ktxBasisParams | |
| public static ktxBasisParams. | malloc(int
the buffer capacity capacity)Returns a new |
| public static ktxBasisParams | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static ktxBasisParams. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public int | |
| public ktxBasisParams | |
| public int | |
| public ktxBasisParams | |
| public static int | |
| public static void | |
| public static float | |
| public static void | |
| public static ByteBuffer | |
| public static byte | |
| public static void | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static boolean | |
| public static void | |
| public static boolean | |
| public static void | |
| public static boolean | |
| public static void | |
| public static boolean | |
| public static void | |
| public boolean | |
| public ktxBasisParams | |
| public boolean | normalMap()
Tunes codec parameters for better quality on normal maps (no selector RDO, no endpoint RDO) and sets the texture's DFD appropriately. |
| public ktxBasisParams | |
| public boolean | |
| public ktxBasisParams | |
| public boolean | |
| public ktxBasisParams | |
| public static boolean | |
| public static void | |
| public static int | |
| public static void | |
| public static float | |
| public static void | |
| public static boolean | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static boolean | |
| public static void | |
| public static int | |
| public static void | |
| public static boolean | |
| public static void | |
| public static int | |
| public static void | |
| public static boolean | |
| public static void | nuastcRDODontFavorSimplerModes(long struct, boolean value)
Unsafe version of |
| public static float | |
| public static void | nuastcRDOMaxSmoothBlockErrorScale(long struct, float value)
Unsafe version of |
| public static float | |
| public static void | nuastcRDOMaxSmoothBlockStdDev(long struct, float value)
Unsafe version of |
| public static boolean | |
| public static void | |
| public static float | |
| public static void | |
| public static boolean | |
| public static void | |
| public boolean | |
| public ktxBasisParams | |
| public int | |
| public ktxBasisParams | |
| public float | |
| public ktxBasisParams | |
| public boolean | |
| public ktxBasisParams | |
| public ktxBasisParams | set(int structSize, boolean uastc, boolean verbose, boolean noSSE, int threadCount, int compressionLevel, int qualityLevel, int maxEndpoints, float endpointRDOThreshold, int maxSelectors, float selectorRDOThreshold, ByteBuffer inputSwizzle, boolean normalMap, boolean separateRGToRGB_A, boolean preSwizzle, boolean noEndpointRDO, boolean noSelectorRDO, int uastcFlags, boolean uastcRDO, float uastcRDOQualityScalar, int uastcRDODictSize, float uastcRDOMaxSmoothBlockErrorScale, float uastcRDOMaxSmoothBlockStdDev, boolean uastcRDODontFavorSimplerModes, boolean uastcRDONoMultithreading)
Initializes this struct with the specified values. |
| public ktxBasisParams | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public int | |
| public int | |
| public ktxBasisParams | |
| public int | |
| public ktxBasisParams | |
| public boolean | |
| public ktxBasisParams | |
| public int | |
| public ktxBasisParams | |
| public boolean | |
| public ktxBasisParams | |
| public int | |
| public ktxBasisParams | |
| public boolean | |
| public ktxBasisParams | uastcRDODontFavorSimplerModes(boolean value)
Sets the specified value to the |
| public float | |
| public ktxBasisParams | uastcRDOMaxSmoothBlockErrorScale(float value)
Sets the specified value to the |
| public float | |
| public ktxBasisParams | uastcRDOMaxSmoothBlockStdDev(float value)
Sets the specified value to the |
| public boolean | |
| public ktxBasisParams | uastcRDONoMultithreading(boolean value)
Sets the specified value to the |
| public float | |
| public ktxBasisParams | |
| public boolean | |
| public ktxBasisParams |