Shut up you idiot!
Shut up idiot!
How does "you" affect the meaning of the first clause? Are they both formal ways of addressing?
This is direct address in both cases, although it is hardly formal, so there should be a comma after "up" if this is in writing:
Shut up, you idiot!
Shut up, idiot!
There is no significant change in meaning.
This is not a polite usage.