TextureFormat
Textures can store their pixels in different formats. The set of color channels and the number of bits stored for each channel can differ, allowing Textures to optimize their storage for certain kinds of image formats or rendering techniques.
Value | Description |
rgb | Each pixel is 24 bits, or 8 bits for each channel. |
rgba | Each pixel is 32 bits, or 8 bits for each channel (including alpha). |
rgba4 | An rgba format where the colors occupy 4 bits instead of the usual 8. |
rgba16f | Each pixel is 64 bits. Each channel is a 16 bit floating point number. |
rgba32f | Each pixel is 128 bits. Each channel is a 32 bit floating point number. |
r16f | A 16-bit floating point format with a single color channel. |
r32f | A 32-bit floating point format with a single color channel. |
rg16f | A 16-bit floating point format with two color channels. |
rg32f | A 32-bit floating point format with two color channels. |
rgb5a1 | A 16 bit format with 5-bit color channels and a single alpha bit. |
rgb10a2 | A 32 bit format with 10-bit color channels and two alpha bits. |
rg11b10f | Each pixel is 32 bits, and packs three color channels into 10 or 11 bits each. |
d16 | A 16 bit depth buffer. |
d32f | A 32 bit floating point depth buffer. |
d24s8 | A depth buffer with 24 bits for depth and 8 bits for stencil. |
See also
lovr.graphics