Setting a proper perspective matrix