Stencil Shadow and Vertex Shader

What is the best way to make “Stencil Shadow”
with Vertex Shader???
1 Vertex Shader only???
2 Vertex Shader + C.P.U.???

Thanks in advance