Why would I NOT want to do this?

The thing is I want to find a way to store the surface thickness of a 3d object at each pixel. Perhaps there is a better way? Any ideas are welcome.

I figured I can use the alpha channel to store the decimals like this:

Code:
int decimals = (int) (val - floor(val)) * 100.0f);
Only two decimals, 0 to 99 but that should be enough.