Split texture packing into two functions for publishing and compiling.