The following is a simple, comprehensive guide that explains in plain terms how literals can be used to encode / decode sprites within a fragment shader. The Bigger Picture For the time being we will limit our efforts to encoding monochrome sprites. A pixel in a monochrome bitmap can be either on or off (black or white) which means that we only require a single bit of memory to store each pixel’s value. The size of an signed integer in glsl 1.3 or later is 32-bits [1] which in theory means ...