hi all,
I have a skia canvas with multiple objects, and render the same scene a second time for hitdetection with a pipet. the idea is that my object ID correlates with the texture brightness.
Each object is on a separate zLayer.
Using a 256 linear spread for IDs does not work, because the 8bit precision from the texture readback produces rounding errors. What IDs (=colors) can I use for the objects, that can be represented perfectly as colors? I would like to avoid splitting the ID into multiple channels.
texture8bitRounding.vl (10.5 KB)
Maybe saving as bits or hex is an option?