I'd like to combine height, two UV gradients and ID into single 32-bit gray channel to use it in fx-map node max blending to then split successfully after.
I tried to put the height before the comma and two gradients as passengers after in digits order using just floor and add nodes ? It works with one gradient at best , the second comes pretty degraded due to values precision and no room for ID at all.
Should I use some other math . Rather multiplying one to another? Isn't floating point value should allow to pack lots of info? Is there any cool advanced way to do it that could workaround precision issue? Sort of bit masks maybe?
Isn't floating point value should allow to pack lots of info?
Not really, the point of floating point numbers was to combine an extended range with good precision (which relates to significant digits not to decimal places i.e. decimal place precision varies on the size of the number being represented).
What are you trying to achieve by combining the channels that treating them separately and using instancing for the fx would not?
Too many instances nesessary. Works too slow.
The issue with packing such data into a single floating value using the pre decimal point and post decimal point parts is that changes to the pre-decimal point part can affect the post-decimal point part. This is due to the way floating point numbers work with larger numbers having less precision after the decimal point (the precision is set in terms of significant digits not decimal points).
Yeah, I see this . But hope there might be certain range where it would still work. It's like a short blanket , enough to cover one thing or another. So some tradeoff is inevitable.
Looks like shape splatter uses same idea .