My question is: how can I draw that kind of shape, changed dynamically, with XNA 4.0. I can calculate each point of this shadow polygon. I would avoid drawing it pixel by pixel due to performance reasons, maybe particles? But i won't have sharp edges with this technique. Any tips?

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

The technique is the same as rendering shadows (many resources online). The difference is that instead of rendering the gray area as a shadow, you're using it as a mask to hide parts of the green area.
–
MattDaveyJun 14 '11 at 13:50

I don't know if it also exists under XNA, but with DirectX (and OpenGL I guess) you can use the stencil buffer to achieve exactly that effect.
–
HeandelJun 14 '11 at 13:55

@Anko this duplicate close vote leads to a chain of duplicate links, and it ends up in a closed question with no answers. That doesn't seem right.
–
Seth BattinMar 11 '14 at 5:50

@Seth You're right. I meant to close them all as a duplicate of this one, which I think has the clearest phrasing and a clear (if somewhat incomplete) answer. Byte seems to have closed it as a duplicate of a much vaguer question for some reason. (I've voted to reopen it and added my reasons in the comments there.)
–
AnkoMar 11 '14 at 14:43