PVRTexTool Command Line Options#
Option |
Description |
Usage |
Example |
---|---|---|---|
Help |
Provides a list of all available CLI options. Help can also be used to output additional information about a specific option. |
|
|
Input file |
[REQUIRED] Sets the input file or files. Must be a JPEG, PNG, BMP, TGA, HDR, GIF, PSD, PPM, PGM, PIC, PVR, KTX, KTX2, DDS, ASTC file, or BASIS container file. If either the cube map or texture array flag is set, multiple files should be explicitly specified. |
|
|
Input colour space |
Explicitly set the colour space for all input files. Valid colour spaces:
|
|
|
No Output |
Suppress the output of a .pvr file |
|
|
Output file |
Sets the output file destination. If specified, must be a PVR, KTX, KTX2, H, or DDS file. Otherwise the application outputs a file with the same name as the first input file. |
|
|
Decompress output |
If set, saves a decompressed file alongside the input. A file name can be specified as JPEG, PNG, BMP, TGA or HDR. If the file name is unspecified, the file is decompressed to a file with the same name as the first input file (the default decompressed file type is PNG). For cube maps and texture arrays, the behaviour is different. A series of decompressed files is output in the following format:
For example: |
|
|
Cube map |
Constructs a cube map from available input files. The input file argument must contain at least six textures or a multiple of six textures if the array flag is present. Textures of different sizes are resized with a linear filter to the size of the original texture, or the specified size if resizing. |
|
|
Equi to Cube map |
Constructs a cube map from a single equirectangular image, the input file must have an aspect ratio of 2:1. By default this operation uses a linear filter; optionally supply ‘nearest’, ‘linear’ or ‘cubic’ to override. |
|
|
Texture array |
Constructs a texture array from available input files. The input file argument should contain multiple files or a multiple of six textures if the cube map flag is enabled. |
|
|
Resize |
Resizes a texture to the given size represented by two unsigned integer parameters for width and height. Values up to 8096x8096 are supported. This option is incompatible with square or power of two resize options. |
|
|
Resize square |
Forces the texture into a square. A single character parameter, - or +, can be specified to indicate if it should be resized smaller or larger. Incompatible with standard resize. |
|
|
Resize power of two |
Forces the texture into power of two dimensions. A single character parameter, - or +, can be specified to indicate if it should be resized smaller or larger. Incompatible with standard resize. |
|
|
Resize filter |
By default, a linear filter is used to resize textures. Setting this flag to nearest, linear or cubic forces PVRTexTool to use the specified filter to resize textures. |
|
|
Rotate |
Rotate the texture around a given axis x, y or z. Currently only z is supported; this is a standard 2D rotate. Also requires a second argument - or + to choose the rotate direction. In the context of a 2D rotation + is clockwise and - is anti-clockwise. |
|
|
Flip |
Flips the texture over a given axis x, y, or z. Currently only x and y are supported providing a standard 2D flip. Also accepts an optional second argument (flag) that adds metadata to the texture marking it as being flipped. This is useful when knowledge of the orientation is required ahead of time, for example, if displaying a flipped texture in its original orientation. |
|
|
Add border |
Adds a mirrored border to the texture. If no arguments are specified, PVRTexTool chooses an appropriate border size for the texture. Alternatively, border sizes can be chosen manually for the width and height. Specifying only the width is allowed, and results in the vertical border having a height of zero. |
|
|
Pre-multiply alpha |
Pre-multiplies the texture by its alpha value. |
|
|
Alpha bleed |
Discards any data in fully transparent areas to optimise the texture for better compression. |
|
|
Normal map generation |
Uses the input texture as a height map to generate a normal map by creating an intensity texture from the r, g and b channels. Accepts two arguments: a positive float which determines the scale that the height map is assumed to be on, and a string of a combination of the four characters x, y, z and h. These specify the channel order as saved out into the texture. x, y and z specify these components, and h specifies the original height value used. Duplicate channels are not allowed, but channels can be missed off. This argument is optional, and the default is xyz. |
|
|
Mipmap generation |
Generates MIP maps for the current texture. An optional unsigned integer can be added to specify the number of MIP map levels which should be generated, otherwise a full chain is created. |
|
|
MIP map filter |
Specifies the filter used to generate MIP maps: nearest, linear, or cubic. If not specified, a linear filter is used. |
|
|
Colour MIP maps |
Saturates the tail of the MIP map chain with colours for debugging purposes. If the original colour of a texture cannot be seen, then it is assumed to be using MIP maps at all times, and some upper levels can be removed from the texture to reduce memory consumption. |
|
|
Encode format |
|
|
|
Encode quality |
|
|
|
Dither |
If set, tells the compressor to dither the texture before compression to avoid banding artefacts. |
|
|
Max Range |
Sets the maximum range (min 1.0) to use when encoding to RGBM and RGBD texture formats. A higher value will allow for a higher dynamic range at the expense of accuracy which may lead to artefacts such as banding. This value will also be inserted into the PVR meta data. |
|
|
Diffuse Irradiance |
Generate a Mip mapped diffuse irradiance texture from a cube-map environment texture, to be used primarily with physically based rendering (PBR) techniques. First (required) argument is the number of samples to use when generating the environment map. Second (required) argument is the output dimensions, in pixels. The default channel type for this texture is 32 bit floating point. |
|
|
Pre-filtered Specular |
Generates a Mip mapped pre-filtered specular irradiance texture from a cube-map environment texture, to be used primarily with physically based rendering (PBR) techniques. Each Mip level of the specular map is blurred by a roughness value between 0 and 1. First (required) argument is the number of samples to use when generating the environment map. Second (required) argument is the output dimensions, in pixels. Third (optional) argument is the number of Mip levels to be discarded from the bottom of the Mip chain. The default channel type for this texture is 32 bit floating point. |
|
|
Include Roughness Zero |
Include a roughness of zero when generating the pre-filtered specular environment map. By default roughness zero will not be included in the pre-filtered specular texture; in this case the user should supply roughness zero from the source environment texture. |
|
|
Red / Green / Blue / Alpha channel |
Sets the red channel in the input texture to match the channel specified in a second image. A file name is specified for the source, and an optional channel name (single character) can be specified to select the source. By default, the channel draws from its equivalent in the new texture. For example, red draws from red, green from green, and so on. Valid source channels are r, g, b, a, l, i. These represent red, green, blue, alpha, luminance and intensity. | |
|
|
Difference |
Calculates the difference between the input and a supplied file, providing error metrics, and is incompatible with performing compression (
|
|
|
Resize canvas |
Resizes a texture to the given size, without changing the image data. This takes effect after resizing. Accepts two unsigned integer parameters for width and height. Values up to 8192x8192 are supported. Option is incompatible with square or power of two canvas resize options. |
|
|
Resize canvas square |
Forces the texture into a square, without changing the image data. This takes effect after resizing. A single character parameter, - or +, can be specified to indicate whether to resize smaller (-) or larger (+). Incompatible with standard resize. |
|
|
Resize canvas power of two |
Forces the texture into power of two dimensions, without changing the image data. This takes effect after resizing. A single character parameter, - or +, can be specified to indicate whether to resize smaller (-) or larger (+). Incompatible with standard resize. |
|
|
Offset canvas |
Sets the offset when performing a canvas resize, including square or pot resizes. Accepts two signed integer parameters for xoffset and yoffset. Values between -8192 x -8192 and 8192 x 8192 are supported. Incompatible with centre canvas. |
|
|
Centre canvas |
Sets the offset when performing a canvas resize (including square or power of two resizes) so that the image resides in the centre of the canvas. Incompatible with canvas offset. |
|
|
Number of Jobs |
Sets the maximum number of threads to use for transcoding. All available cores are used by default. |
|
|
Encode format Description#
Sets the encoding format. The first argument is the format, which is required. This can be either a compressed format or a non-compressed format in the form r8g8b8a8. Up to four channels may be specified but must be matched with a size (in bits) at all times. Valid channel names are r
, g
, b
, a
, i
, l
or x
. Valid channel sizes range from 1
to 32
(bits), but the total bits per pixel must be a multiple of eight (byte aligned). The second argument is the channel type, which is optional for compressed formats. If not specified, this defaults to normalised unsigned byte. It is required for uncompressed formats.
The third argument specifies the colour space, which accepts either sRGB or lRGB. The default is lRGB for linear RGB.
If an encoding format is not specified then the texture format of the first input will be used.
Valid compressed formats:
ASTC_4X4, ASTC_5X4, ASTC_5X5, ASTC_6X5, ASTC_6X6, ASTC_8X5, ASTC_8X6, ASTC_8X8
ASTC_10X5, ASTC_10X6, ASTC_10X8, ASTC_10X10, ASTC_12X10, ASTC_12X12
ASTC_3X3X3, ASTC_4X3X3, ASTC_4X4X3, ASTC_4X4X4, ASTC_5X4X4, ASTC_5X5X4, ASTC_5X5X5, ASTC_6X5X5, ASTC_6X6X5, ASTC_6X6X6
BASISU_ETC1S, BASISU_UASTC
BC1, BC2, BC3, BC4, BC5
BW1BPP
DXT2, DXT4
EAC_R11, EAC_RG11
ETC1, ETC2_RGB, ETC2_RGBA, ETC2_RGB_A1
GRGB8888
PVRTCI_HDR_6BPP, PVRTCI_HDR_8BPP, PVRTCI_2BPP_RGB, PVRTCI_2BPP_RGBA, PVRTCI_4BPP_RGB, PVRTCI_4BPP_RGBA
PVRTCII_2BPP, PVRTCII_4BPP, PVRTCII_HDR_6BPP, PVRTCII_HDR_8BPP
RGBD
RGBG8888
RGBM
SHAREDEXPONENTR9G9B9E5
UYV10A2_444
UYVA16_444
UYVY10LSB_422, UYVY12LSB_422
UYVY10MSB_422, UYVY12MSB_422
UYVY16_422, UYVY_422
VYUA10LSB_444, VYUA12LSB_444
VYUA10MSB_444, VYUA12MSB_444
YUV10LSB_2P_420, YUV10LSB_3P_420, YUV12LSB_2P_420, YUV12LSB_3P_420
YUV10LSB_2P_422, YUV10LSB_3P_422, YUV12LSB_2P_422, YUV12LSB_3P_422
YUV10LSB_2P_444, YUV10LSB_3P_444, YUV12LSB_3P_444
YUV10MSB_2P_420, YUV10MSB_3P_420, YUV12MSB_2P_420, YUV12MSB_3P_420
YUV10MSB_2P_422, YUV10MSB_3P_422, YUV12MSB_2P_422, YUV12MSB_3P_422
YUV10MSB_2P_444, YUV10MSB_3P_444, YUV12MSB_3P_444
YUV16_2P_420, YUV16_2P_422, YUV16_3P_420, YUV16_3P_422, YUV16_3P_444
YUV_2P_420, YUV_2P_422, YUV_2P_444, YUV_3P_420, YUV_3P_422, YUV_3P_444
YUY2_422
YUYV10LSB_422, YUYV12LSB_422
YUYV10MSB_422, YUYV12MSB_422
YUYV16_422
YVU10LSB_2P_420, YVU10LSB_2P_422, YVU10LSB_2P_444
YVU10MSB_2P_420, YVU10MSB_2P_422, YVU10MSB_2P_444
YVU_2P_420, YVU_2P_422, YVU_2P_444, YVU_3P_420
Valid variable types:
UB
UBN
SB
SBN
US
USN
SS
SSN
UI
UIN
SI
SIN
UF
SF
Key:
First char:
S=Signed,
U=Unsigned
Second char:
B=Byte,
S=Short,
I=Integer,
F=Float
Third Char (optional):
N=Normalised
Valid colour spaces:
lRGB
sRGB
bt601
bt709
bt2020
Encode quality Description#
Sets the level of compression quality used for PVRTC, ETC, ASTC and BASISU formats.
Valid quality modes:
pvrtcfastest,
pvrtcfast,
pvrtclow,
pvrtcnormal,
pvrtchigh,
pvrtcveryhigh,
pvrtcthorough,
pvrtcbest,
etcfast,
etcnormal,
etcslow,
astcveryfast,
astcfast,
astcmedium,
astcthorough,
astcexhaustive,
basisulowest,
basisulow,
basisunormal,
basisuhigh,
basisubest