Currently textures are hardcoded to be RGBA 8:8:8:8. It would be useful to support other formats. At a minimum, having a single channel, 16 bit texture would be useful for depth maps. For reading textures, the individual channels are unpacked here. This calls into Surface, which reads the pixels here. The renderer should also be able to write to any texture format when rendering to texture. Currently the code here is hard-coded to writing RGBA 8:8:8:8.
Currently textures are hardcoded to be RGBA 8:8:8:8. It would be useful to support other formats. At a minimum, having a single channel, 16 bit texture would be useful for depth maps. For reading textures, the individual channels are unpacked here. This calls into Surface, which reads the pixels here. The renderer should also be able to write to any texture format when rendering to texture. Currently the code here is hard-coded to writing RGBA 8:8:8:8.