Changed the texture generation algorithim