User:SirYodaJedi/Image formats: Difference between revisions
Jump to navigation
Jump to search
Note:The Steam versions of
support RLE-compressed TGA files for certain use cases, such as skyboxes and detail textures. Other use cases, such as taskbar icons, do not support RLE compression.
Not all programs can export compressed TGAs; GIMP does this when exporting to TGA by default. Make sure that the origin is set to "bottom-left".
Note:All formats supported by
can be compressed with PNG-style deflate compression, using its custom v7.6 VTF format. This is used in conjunction with whatever inherent GPU-supported compression format is being used; as such, it is not mentioned in this table.
Note:Although the VTF format used by
supports encoding color channels in multiple orders (RGB, BGR, RGBA, BGRA, ARGB, ABGR), only BGR and BGRA are guaranteed to work correctly. By comparison,
prefers RGB and RGBA, using its VTEX format.
Note:Additionally, formats with a 1-bit alpha channel, such as BGRA5551 or BGR888_BLUESCREEN are not as reliable as those with a 4-bit or 8-bit alpha channel, and will often treat the entire image as opaque, with the transparent pixels appearing as black.
Formats with 1-bit alpha should be avoided anyway (except in
), even when using $alphatest, as it will result in inaccurate transparency on mipmaps.
SirYodaJedi (talk | contribs) m (Source 1 prefers BGR, but Source 2 prefers RGB) |
SirYodaJedi (talk | contribs) m (What to use instead of BC4-BC7 on source 1) |
||
Line 33: | Line 33: | ||
{{source2}}: Not recommended; use BC7 instead | {{source2}}: Not recommended; use BC7 instead | ||
|- | |- | ||
| '''BGRA8888 | | '''BGRA8888''' (Source 1 Compressed HDR) | ||
| No | | No | ||
| Yes | | Yes | ||
Line 106: | Line 106: | ||
| '''ATI1N''' (AKA BC4) | | '''ATI1N''' (AKA BC4) | ||
| No | | No | ||
| No | | No (use I8) | ||
| Yes | | Yes | ||
| Yes | | Yes | ||
Line 115: | Line 115: | ||
| '''ATI2N''' (AKA BC5) | | '''ATI2N''' (AKA BC5) | ||
| No | | No | ||
| No | | No (use BGR565 if really necessary) | ||
| Yes | | Yes | ||
| Yes | | Yes | ||
Line 124: | Line 124: | ||
| '''BC6H''' (AKA BC6) | | '''BC6H''' (AKA BC6) | ||
| No | | No | ||
| No | | No (use compressed BGRA8888) | ||
| Yes | | Yes | ||
| Yes | | Yes | ||
Line 132: | Line 132: | ||
| '''BC7''' (AKA BC6) | | '''BC7''' (AKA BC6) | ||
| No | | No | ||
| No | | No (use BGR565 or BGRA8888) | ||
| Yes | | Yes | ||
| Yes | | Yes |
Revision as of 19:33, 1 October 2022
Supported in | ||||||
---|---|---|---|---|---|---|
Format | ![]() |
![]() |
![]() |
![]() |
Compressed? | Recommended usage |
P8 (256-color) | Yes, except for main menu backgrounds and detail textures | No (use BGR565 or BGRA8888) | No (use BC7) | No (use BC7) | Yes, 1 palette for entire image with 256 colors | ![]() |
BGR888, RGB888 (24-bit true color) | Limited; only for skyboxes, detail textures, main menu backgrounds, and VGUI2 elements | Yes | Yes | Yes | No (except in ![]() |
![]() |
BGRA8888, RGBA8888 (32-bit true color with translucency) | No | Yes | Yes | Yes | No | ![]()
|
BGRA8888 (Source 1 Compressed HDR) | No | Yes | Yes | No (use BC6H) | Yes (see Valve_Texture_Format#HDR_compression) | ![]() |
BGR565 (16-bit color) | No | Yes | Yes | No (use BC7) | No | ![]()
|
BGRA4444 (16-bit color with translucency) | No | Yes | Yes | No (use BC7) | No | ![]() |
I8 (8-bit greyscale) | No | Yes | Yes | Yes | No | ![]()
|
IA88 (8-bit greyscale with translucency) | No | Yes | Yes | Yes | No | ![]() |
DXT1 (AKA BC1) | No (except in ![]() |
Yes | Yes | Yes | Yes; two explicit BGR565 colors and two interpolated colors per 4x4 block | ![]() ![]() ![]() |
DXT3 (AKA BC2) | No | Yes | Yes | No (use DXT5) | RGB only; RGB handled like DXT1, with uncompressed 4-bit alpha | ![]() ![]() |
DXT5 (AKA BC3) | No | Yes | Yes | Yes | Yes; RGB handled like DXT1, with alpha handled like ATI1N | ![]() ![]() ![]() |
ATI1N (AKA BC4) | No | No (use I8) | Yes | Yes | Yes; four explicit I8 values and four interpolated values per 4x4 block | ![]()
|
ATI2N (AKA BC5) | No | No (use BGR565 if really necessary) | Yes | Yes | Yes; two independent ATI1N-style channels (red and green) | ![]() |
BC6H (AKA BC6) | No | No (use compressed BGRA8888) | Yes | Yes | Yes; four explicit RGB161616 or RGB16f16f16f colors and four interpolated colors per 4x4 block | ![]() ![]() |
BC7 (AKA BC6) | No | No (use BGR565 or BGRA8888) | Yes | Yes | Yes; four explicit RGB888 or RGBA8888 colors and four interpolated colors per 4x4 block | ![]() ![]() |


Not all programs can export compressed TGAs; GIMP does this when exporting to TGA by default. Make sure that the origin is set to "bottom-left".






Formats with 1-bit alpha should be avoided anyway (except in
