Good news regarding the compression assignment! Turns out that out of all of the ridiculous and fancy ways we could have compressed the data, there was a simple solution that the entire Internet seemed to have no knowledge of.
In this model, one can take the range of values that can be represented with each bit size (2 bits = 4 values, 5 bits = 32 values, 16 bits = 65536 values, etc). Take the minimum and maximum of a given set of data and put each of those bit values as markers in that range, floor clamping the float values to those markers. Next up is decompressing the data - it seems I need to attach a small header containing the minimum, maximum, and bit value since the decompressor can't take command line arguments.
The downside is that the prototype class will have to be moved out of the way for a little while; I did manage circles that incorporate Unity's water texture as sections to slow down the bullets and player in the scene though. I did have to make a slight change to the shader (swizzle to the xy plane, instead of the xz plane) but otherwise it looks pretty neat:
I did have to place some restriction on the water though; if it was set to not ignore raycasting, the buttons would have trouble picking up the touch inputs if the water ran behind them.
Back to decompression work!
No comments:
Post a Comment