New image formats for UIImageKnob
We really want separate alpha planes. Use PNG transparency to have a separate alpha for :
- diffuse
- material
- depth
- emissive
- emissive hovered
- emissive dragged
This would be a separate image format for UIImageKnob, and would still support the older one.
Would be cool to have completely different images for hovered and dragged though ^^
This Renegate UIImageKnob is quite large already, at 76kb.
The annoying thing is how expensive it is in binary size. The most practical would be: Diffuse / Material / Emissive / Depth in RGBA16 PNG, but that is 200kb in a realistic case. If you separate the 16-bit depth, you can get it down to around 90kb but quite complicated. Using separate data for hovered and dragged gets even more expensive unfortunately.
Possibly a .glb mesh addition would be useful (but that would require a rasterizer that can rasterize to depth also).
Binary size will be fixed once we integrate gamut, with its QOIX codec supporting 10-bit images.
Future ImageKnob format:
One row with Diffuse Depth Material Emissive, all with transparency channel.
One row with Diffuse Depth Material Emissive, all with transparency channel but not rotated, in order to mix and match rotated and fixed elements.
The fixed elements are above the rotating ones.

Saves 60% with QOI-10b vs PNG 16-bit.
As described in the Dplug Tutorial, the new gamut library introduce a "QOIX" format that does 10-bit knobs efficiently
Gamut v1.0.0 minimally usable for loading images (though it will belikely be slower at first, because of conversions)
#724 was completed so this is unblocked
Preliminary work leads to another format, however the reason why the edges are bad are because we resize alpha separately from RGB. In the future, a 16-bit image shall be provided, this images is first aoclpha-premultiplied, then resized in reflow as a single 4HxH block, and then sampled in a single 16-bit RGBA Mipmap of 1-level. Hence, we need RGBA16 linear sampling, and RGBA16 resize, and RGBA16 mipmap, and alpha premul (this one in gamut eventually).
Done! The new format looks like this:
It's called "BADAMA_16" since the content is:
- One square of basecolor+alpha (emissive is given programmatically)
- One square of Depth + alpha (depth occupies green channel)
- One square of Material + alpha
The former "ABDME_8" format is still supported, the bit depth give what format the input image is. UIImageKnob support both.
Available in v13.7.0