jbush001 / NyuziProcessor

GPGPU microprocessor architecture
Apache License 2.0
1.97k stars 349 forks source link

librender: support multiple texture formats #114

Open jbush001 opened 6 years ago

jbush001 commented 6 years ago

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.

jbush001 commented 6 years ago

Partially implemented here: 92341ae9d118e4a6d94094985896e5ff2378b31c