I did a quick test, if you just need a binary mask for metallic, I tried something that almost worked but leaves a bit of a boundry mark…
Take your greyscale makes (which will be between 0-1) (well as a safety factor you could multiply it by 0.99 or whatever to knock it below 1)
and your metallic binary (which will be 0 OR 1) and add them together
the result will either be un-changed or a value between 1 and 2
But we can’t save anything beyond 1 to a texture so divide it by 2 to bring the whole thing down between 0-1
Then this gets rendered to the render target
To decode we just multiply by 2 to expand to 0-2 then we mask if it’s above 1, then subtract that from the original…
The resulting is the greyscale texture, and the above 1 is our binary…
This looks like it works but it has a thin 1 pixel outline, turning off texture filtering didn’t seem to help, adding compression to the mix made it looks pretty rough. Ah well it was worth a shot!
edit: on the primitive data that was just kind of a tangent, I was just saying if you ever need to pass more data via just pure float handling then some of this trickery works for that, it just seems texture compression and filtering mess up my schemes.
It’s possible 1 bit encoding may be possible to be honest but binary encoding was kind of expensive, I can show you my code if you DM me on discord.