How do you pack one 32 bit integers into 4, 8bit ints in GLSL / WebGL?
You can bitshift by multiplying/dividing by powers of two. As pointed out in the comments the approach I originally posted was working but incorrect, here’s one by Aras Pranckevičius, note that the source code in the post itself contains a typo and is HLSL, this is a GLSL port with the typo corrected: const vec4 … Read more