Zero-waste single-pass packing of power-of-two textures
Rectangle packing doesn’t actually have to be a NP-hard problem if we don’t need to solve the most general case. In this post I present a simple yet optimal algorithm for packing power-of-two textures into a texture array.