extract base texture handling to a separate class