We’re wanting to add a single, 8-bit channel per pixel, such as a “Luminance” map, and so we only need 1 byte per pixel to indicate the “Brightness” of that pixel.
I’m not sure how to do this in Urho3D. Is it possible? We’re trying to avoid setting a full UInt32 for each pixel (4 bytes instead of 1).
The Texture formats seem to be limited to these values:
public enum CompressedFormat
{
None = 0,
Rgba = 1,
Dxt1 = 2,
Dxt3 = 3,
Dxt5 = 4,
Etc1 = 5,
PvrtcRgbN2Bpp = 6,
PvrtcRgbaN2Bpp = 7,
PvrtcRgbN4Bpp = 8,
PvrtcRgbaN4Bpp = 9
}
Our images are programmatic, such as a geographic Height Map. We read in the elevations of the area, and then write values to a bitmap. We’d like to simply write a value of 0…255 for the height, rather than a 32-bit float, or UInt32. 1 byte is enough for us.
Here’s an image of our Map app here. The color coding here is based off Height and Slope. Currently we’re encoding the “slope” component into the RBGA format “Alpha” channel, but we really need to reserve this channel for “alpha” so that we can have transparency.