|Available since LÖVE 0.9.0|
|This enum is not supported in earlier versions.|
- The default Canvas format - usually an alias for the
rgba8format, or the
srgbformat if gamma-correct rendering is enabled in LÖVE 0.10.0 and newer.
- A format suitable for high dynamic range content - an alias for the
The 16 bpp RGB and RGBA formats use half as much VRAM as the 32 bpp RGBA formats, but they have significantly lower quality.
The HDR / floating point formats are most useful when combined with pixel shaders. Effects such as tonemapped HDR with bloom can be accomplished, or the canvas can be used to store arbitrary non-color data such as positions which can then be used in a custom shader.
The sRGB format should only be used when doing gamma-correct rendering, which is an advanced topic and it's easy to get color-spaces mixed up. If you're not sure whether you need this, you might want to avoid it. Read more about gamma-correct rendering here, here, and here.
Not all systems support every format. Use love.graphics.getCanvasFormats to check before creating the Canvas.
rgb5a1 are supported everywhere.
rgb10a2 is also supported everywhere on desktop platforms.
The regular single- and two-channel formats (
rg8), as well as the
srgb format, are supported on desktop graphics cards capable of OpenGL 3+ / DirectX 10+ (nvidia GeForce 8000 series and up, ATI/AMD HD 2000 series and up, and the Intel HD 2000 and up), and mobile GPUs capable of OpenGL ES 3.
The floating-point formats (
rg32f) are supported on OpenGL 3-capable desktop graphics cards, and some OpenGL ES 3 mobile GPUs. The 32-bit-per-channel floating point formats are rarely supported on mobile devices.
rgb565 is often only supported on OpenGL ES / mobile devices, or with very new desktop OpenGL drivers.
Tiếng Việt –