Some mathematics, working on texture loader. Doesnt work atm