IMAGE_FORMAT
Description
Enumerations used by GetRenderTargetEx to determine the byte format of each pixel in the Render Target.
Values
| IMAGE_FORMAT_DEFAULT | -1 | |
| IMAGE_FORMAT_RGBA8888 | 0 | Red, Green, Blue, Alpha, 8 bit per pixel. |
| IMAGE_FORMAT_ABGR8888 | 1 | Probably legacy format. Alpha, Red, Green, Blue, 8 bit per pixel. |
| IMAGE_FORMAT_RGB888 | 2 | Legacy format. Red, Green, Blue, 8 bit per pixel. D3DFMT_R8G8B8 is invalid for most modern video cards. Thats why IMAGE_FORMAT_RGB888 and IMAGE_FORMAT_BGR888 is legacy formats. It have fallback to IMAGE_FORMAT_BGRX8888. X means «any». |
| IMAGE_FORMAT_BGR888 | 3 | Legacy format. Blue, Green, Red order, 8 bit per pixel. |
| IMAGE_FORMAT_RGB565 | 4 | Red, Green, Blue, 5 bit per pixel for Red and Blue channels, 6 bits for Green. Effectively uses less video memory. |
| IMAGE_FORMAT_ARGB8888 | 11 | IMAGE_FORMAT_RGBA8888 with different byte order. Legacy format. |
| IMAGE_FORMAT_BGRA8888 | 12 | IMAGE_FORMAT_RGBA8888 with different byte order. Legacy format. |
| IMAGE_FORMAT_RGBA16161616 | 25 | RGBA, but 16 bits per pixel. Was meant to be used for "Integer mode" for HDR. |
| IMAGE_FORMAT_RGBA16161616F | 24 | RGBA, but floating point 16 bits per pixel. Is used for "Float mode" HDR. |
Additional Values
In addition to the enum values listed above, there are several additional image formats that can be used to create Render Targets but do not have Lua variables defined for them.
To use these additional enums, use the numerical value directly.
(E.g. use 5 instead of IMAGE_FORMAT_I8)
The values below may not be an completely exhaustive list.
For more information on these formats, see VTF Enumerations.
General
The following enum values are from the base Source Engine and do not have Lua variables defined for them simply because they are used less frequently than other formats.
| Enum Name | Value | Description |
|---|---|---|
| IMAGE_FORMAT_I8 | 5 | Grayscale format (black and white), 8 bits per pixel. Not working on Proton as of 2026/01/11. |
| IMAGE_FORMAT_IA88 | 6 | Grayscale format (black and white) with alpha support, 8 bits per pixel/channel. Not working on Proton. |
| IMAGE_FORMAT_A8 | 8 | 8 bit alpha. |
| IMAGE_FORMAT_BGRX8888 | 16 | Same as BGRA8888, but 4th X channel is empty. |
| IMAGE_FORMAT_BGR565 | 17 | RGB565, but reverse color order. |
| IMAGE_FORMAT_BGRX5551 | 18 | 5 bits per RGB, 4th bit is empty. |
| IMAGE_FORMAT_BGRA4444 | 19 | 4 bits per pixel. |
| IMAGE_FORMAT_BGRA5551 | 21 | 5 bits per RGB, 1 bit alpha. |
| IMAGE_FORMAT_R32F | 27 | Single color channel, 32bit float per pixel. |
| IMAGE_FORMAT_RGBA32323232F | 29 | 32bit floating point RGBA. |
| IMAGE_FORMAT_DXT1 | 13 | Compressed texture format. See https://en.wikipedia.org/wiki/S3_Texture_Compression. |
| IMAGE_FORMAT_DXT3 | 14 | Compressed texture format. Do not use. See https://en.wikipedia.org/wiki/S3_Texture_Compression. |
| IMAGE_FORMAT_DXT5 | 15 | Compressed texture format. Better quality than DXT1, supports alpha. See https://en.wikipedia.org/wiki/S3_Texture_Compression. |
Team Fortress 2
The following enum values are available on the main and dev branches and are originally from Team Fortress 2's engine branch.
| Enum Name | Value | Description |
|---|---|---|
| IMAGE_FORMAT_NV_DST16 | 30 | Hardware 16 bit Depth texture format for shadow depth mapping. Used in ProjectedTexture. |
| IMAGE_FORMAT_NV_DST24 | 31 | Hardware 24 bit Depth texture format for shadow depth mapping. |
| IMAGE_FORMAT_NV_INTZ | 32 | Hardware depth format. Allow to read depth as color texture. See D3D9 GPU Hacks. |
Counter-Strike: Global Offensive
The following enum values are available on the x86-64 branch and are originally from Counter-Strike: Global Offensive's engine branch
| Enum Name | Value | Description |
|---|---|---|
| IMAGE_FORMAT_D16 | 39 | Hardware 16 bit Depth texture format for shadow depth mapping. |
| IMAGE_FORMAT_D16_SHADOW | 47 | Hardware 16 bit Depth texture format for shadow depth mapping. Used in ProjectedTexture. |
| IMAGE_FORMAT_D24X8_SHADOW | 48 | Hardware Depth-stencil texture format for shadow depth mapping. 24 bit depth + 8 bit stencil. |
| IMAGE_FORMAT_INTZ | 67 | Hardware depth format. Allow to read depth as color texture. See D3D9 GPU Hacks. |
Garry's Mod
Rust
Steamworks
Wiki Help