User:SirYodaJedi/Image formats: Difference between revisions
SirYodaJedi (talk | contribs) m (Finally get "Source 2" label on one line) |
SirYodaJedi (talk | contribs) mNo edit summary |
||
Line 17: | Line 17: | ||
|- | |- | ||
| '''BGR888''', '''RGB888''' (24-bit true color) | | '''BGR888''', '''RGB888''' (24-bit true color) | ||
| Limited; only for skyboxes, detail textures, main menu backgrounds, and | | Limited; only for skyboxes, detail textures, main menu backgrounds, and VGUI elements | ||
| Yes | | Yes | ||
| Yes | | Yes | ||
| Yes | | Yes | ||
| No (except in {{gldsrc}}, see notes) | | No (except in {{gldsrc}}, see notes) | ||
| {{gldsrc}}: Skyboxes, detail textures, main menu backgrounds, and | | {{gldsrc}}: Skyboxes, detail textures, main menu backgrounds, and VGUI elements | ||
{{src}}, {{p2ce}}, and {{source2}}: Not recommended | {{src}}, {{p2ce}}, and {{source2}}: Not recommended | ||
|- | |- | ||
| '''BGRA8888''', '''RGBA8888''' (32-bit true color with translucency) | | '''BGRA8888''', '''RGBA8888''' (32-bit true color with translucency) | ||
| | | Limited; only for VGUI elements | ||
| Yes | | Yes | ||
| Yes | | Yes | ||
Line 68: | Line 68: | ||
| No (use BC7) | | No (use BC7) | ||
| No | | No | ||
| {{src}}: | | {{src}}: Not recommended; causes noticable color shift rendering it unable to portray a flat normal map.<br> | ||
{{p2ce}}: Not recommended; use BC7 instead | {{p2ce}}: Not recommended; use BC7 instead. | ||
|- | |- | ||
| '''I8''' (8-bit greyscale) | | '''I8''' (8-bit greyscale) | ||
Line 158: | Line 158: | ||
|} | |} | ||
{{note|The Steam versions of {{gldsrc}} 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.<br/>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|The Steam versions of {{gldsrc}} support RLE-compressed [[TGA]] files for certain use cases, such as skyboxes and detail textures. Other use cases, such as taskbar icons or transparent VGUI sprites, do '''''not''''' support RLE compression.<br/>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 {{p2ce}} can be compressed with [[PNG|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|All formats supported by {{p2ce}} can be compressed with [[PNG|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 {{src}} supports encoding color channels in multiple orders (RGB, BGR, RGBA, BGRA, ARGB, ABGR), only BGR and BGRA are guaranteed to work correctly. By comparison, {{source2}} prefers RGB and RGBA, using its [[VTEX (Source 2)|VTEX]] format. | {{note|Although the [[VTF]] format used by {{src}} supports encoding color channels in multiple orders (RGB, BGR, RGBA, BGRA, ARGB, ABGR), only BGR and BGRA are guaranteed to work correctly. By comparison, {{source2}} prefers RGB and RGBA, using its [[VTEX (Source 2)|VTEX]] format. |
Revision as of 19:33, 30 November 2022
The following is a list of standard image formats, along with which engines support them, whether they are compressed, and when I recommend using them.
{{warning|I have not personally tested the any formats in or
, as I don't have either available to test. I also have not tested IA88, A8, or BGRA16F. The information stated on this page regarding those is based upon conceptual knowledge of the formats and preexisting documentation regarding P2CE's VTF v7.6 and Source 2's VTEX formats.
Supported in | ||||||
---|---|---|---|---|---|---|
Format | ![]() GoldSrc |
![]() Source |
![]() P2CE |
![]() Source 2 |
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 VGUI elements | Yes | Yes | Yes | No (except in ![]() |
![]() |
BGRA8888, RGBA8888 (32-bit true color with translucency) | Limited; only for VGUI elements | Yes | Yes | Yes | No | ![]()
|
BGRA8888 (Source 1 Compressed HDR) | No | Yes | Yes | No (use BC6H) | Yes; alpha channel used as a multiplicand rather than for translucency (see Valve Texture Format#HDR compression) | ![]() |
BGRA16161616F, RGBA16161616F (16 bpc Floating Point HDR with translucency) | No | Yes | Yes | Yes | No | ![]() ![]() ![]() |
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) | Technically (using P8) | Yes | Yes | Yes | No | ![]()
|
IA88 (8-bit greyscale with translucency) | No | Yes | Yes | Yes | No | ![]() |
A8 (Translucency only) | Technically, only for sprites (using IndexAlpha) and decals | Yes | Yes | Yes | No | ![]() ![]() ![]() |
DXT1 (AKA BC1) | (only 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 RGB161616F colors and four interpolated colors per 4x4 block | ![]() ![]() |
BC7 | 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




