Updated code to take per sub mesh offset matrices into account.