Garry's Mod Wiki

IMAGE_FORMAT

Description

Enumerations used by GetRenderTargetEx. Clientside only.

Some additional image formats are accepted by GetRenderTargetEx, but don't currently have enums in Lua and aren't listed here. See VTF Enumerations.

Values

IMAGE_FORMAT_DEFAULT-1
IMAGE_FORMAT_RGBA88880Red, Green, Blue, Alpha, 8 bit per pixel.
IMAGE_FORMAT_ABGR88881Probably legacy format. Alpha, Red, Green, Blue, 8 bit per pixel.
IMAGE_FORMAT_RGB8882Red, Green, Blue, 8 bit per pixel.
IMAGE_FORMAT_BGR8883Legacy format. Blue, Green, Red order, 8 bit per pixel.
IMAGE_FORMAT_RGB5654Red, Green, Blue, 5 bit per pixel for Red and Blue channels, 6 bits for Green. Effectively uses less video memory.
IMAGE_FORMAT_ARGB888811IMAGE_FORMAT_RGBA8888 with different byte order. Legacy format.
IMAGE_FORMAT_BGRA888812IMAGE_FORMAT_RGBA8888 with different byte order. Legacy format.
IMAGE_FORMAT_RGBA1616161625RGBA, but 16 bits per pixel. Was meant to be used for "Integer mode" for HDR. Probably legacy format.
IMAGE_FORMAT_RGBA16161616F24RGBA, but floating point 16 bits per pixel. Is used for "Float mode" HDR.

Description

The following enums do not exist in game and are listed for reference.

Values

IMAGE_FORMAT_I85Grayscale format (black and white), 8 bits per pixel.
IMAGE_FORMAT_IA886Grayscale format (black and white) with alpha support, 8 bits per pixel/channel.
IMAGE_FORMAT_A88Unknown legacy format. 8 bit alpha? Same as I8 besides assigned meaning/name to the channel?
IMAGE_FORMAT_BGRX888816Unknown legacy format. Same as BGRA8888, but without defining meaning to the 4th channel?
IMAGE_FORMAT_BGR56517RGB565, but reverse color order. Legacy format.
IMAGE_FORMAT_BGRX555118Unknown legacy format.
IMAGE_FORMAT_BGRA444419Unknown legacy format.
IMAGE_FORMAT_BGRA555121Unknown legacy format.
IMAGE_FORMAT_R32F27Single color channel, 32bit float per pixel. Works only with mat_disable_d3d9ex 0. Not working on dx 92.
IMAGE_FORMAT_RGBA32323232F2932bit floating point RGBA. Works only with mat_disable_d3d9ex 0
IMAGE_FORMAT_DXT113Compressed texture format. See https://en.wikipedia.org/wiki/S3_Texture_Compression.
IMAGE_FORMAT_DXT314Compressed texture format. Do not use. See https://en.wikipedia.org/wiki/S3_Texture_Compression.
IMAGE_FORMAT_DXT515Compressed texture format. Better quality than DXT1, supports alpha. See https://en.wikipedia.org/wiki/S3_Texture_Compression.