1. Anders Ruud
  2. love
  3. Issues


Issue #476 resolved

Allow optional 16 bits per channel floating point (RGBA16F) canvas textures

Alex Szpakowski
created an issue

Canvas textures use 8 bits per channel by default which is more than enough for most uses, however allowing optional RGBA16F canvases will allow more advanced rendering techniques such as HDR and certain types of dynamic lighting.

While color channel values of standard textures are bounded to [0, 1], floating point formats such as RGBA16F have no such restrictions, allowing for many more lighting and shading techniques when combined with PixelEffects.

Floating point texture formats are only part of OpenGL core in version 3.0 and above, and requires the GL_ARB_texture_float extension otherwise. Some older hardware may have problems with linear texture filtering (see http://www.opengl.org/wiki/Floating_point_and_mipmapping_and_filtering).

The outward-facing API could be as easy as an optional third argument to love.graphics.newCanvas, and a love.graphics.isSupported string to go along with it.

floating-point texture support for regular images is possible but has less usefulness from my understanding, but it may be worth looking into further.