User:SirYodaJedi/Image formats

From Valve Developer Community
< User:SirYodaJedi
Revision as of 15:24, 1 October 2022 by SirYodaJedi (talk | contribs) (Fix copypaste error in I8 description)
Jump to navigation Jump to search
Supported in
Format GoldSrc GoldSrc Source Source Portal 2: Community Edition Portal 2: Community Edition Source 2 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 GoldSrc: Most textures (world, models, sprites, overviews, etc.)
BGR888, RGB888 (24-bit true color) Limited; only for skyboxes, detail textures, main menu backgrounds, and VGUI2 elements Yes Yes Yes No (except in GoldSrc, see notes) GoldSrc: Skyboxes, detail textures, main menu backgrounds, and VGUI2 elements

Source, Portal 2: Community Edition, and Source 2: Not recommended

BGRA8888, RGBA8888 (32-bit true color with translucency) No Yes Yes Yes No Source: Densely detailed textures with alpha channels

Source + Portal 2: Community Edition: Densely detailed low-res normal maps with specular mask via alpha channel ($normalmapalphaenvmapmask).
Source 2: Not recommended; use BC7 instead

BGRA8888, RGBA8888 (Source 1 Compressed HDR) No Yes Yes No (use BC6H) Yes (see Valve_Texture_Format#HDR_compression) Source: HDR skyboxes

Portal 2: Community Edition: Not recommended; use BC6H instead

BGR565 (16-bit color) No Yes Yes No (use BC7) No Source: Low-res normal maps without specular mask;

Source: Densely detailed textures without alpha channels
Portal 2: Community Edition: Not recommended; use BC7 instead

BGRA4444 (16-bit color with translucency) No Yes Yes No (use BC7) No Source: Moderately detailed low-res normal maps with specular mask via alpha channel ($normalmapalphaenvmapmask).

Portal 2: Community Edition: Not recommended; use BC7 instead

I8 (8-bit greyscale) No Yes Yes Yes No Source: Specular masks for materials without a normal map.

Source: Decals using DecalModulate
Portal 2: Community Edition+Source 2: Not recommended; use ATI1N instead

IA88 (8-bit greyscale with translucency) No Yes Yes Yes No Source: Greyscale decals with an alpha channel

Portal 2: Community Edition+Source 2: Not recommended; use BC7 instead

DXT1 (AKA BC1) No (except in Counter-Strike (Xbox) Counter-Strike (Xbox)) Yes Yes Yes Yes; two explicit BGR565 colors and two interpolated colors per 4x4 block Source, Portal 2: Community Edition, & Source 2: Moderately detailed high-res textures with no alpha channel
DXT3 (AKA BC2) No Yes Yes No RGB only; RGB handled like DXT1, with uncompressed 4-bit alpha Source, Portal 2: Community Edition: Not recommended, use DXT5 instead
DXT5 (AKA BC3) No Yes Yes Yes Yes; RGB handled like DXT1, with alpha handled like ATI1N Source, Portal 2: Community Edition, & Source 2: Moderately detailed high-res textures with an alpha channel
ATI1N (AKA BC4) No No Yes Yes Yes; four explicit I8 values and four interpolated values per 4x4 block Portal 2: Community Edition: Specular masks for materials without a normal map.

Source 2: All Specular masks

ATI2N (AKA BC5) No No Yes Yes Yes; two independent ATI1N-style channels (red and green) Portal 2: Community Edition: $blendmodulatetexture, perhaps

Source 2: ???

BC6H (AKA BC6) No No Yes Yes Yes; four explicit RGB161616 or RGB16f16f16f colors and four interpolated colors per 4x4 block Portal 2: Community Edition & Source 2: HDR skyboxes
BC7 (AKA BC6) No No Yes Yes Yes; four explicit RGB888 or RGBA8888 colors and four interpolated colors per 4x4 block Portal 2: Community Edition & Source 2: Whenever DXT1 or DXT5 is too blocky and/or DXT green tint needs to be avoided.
Note.pngNote:The Steam versions of GoldSrc 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.pngNote:All formats supported by Portal 2: Community Edition 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.