Edit texture load function