Try setting the Profile to HiDef in the Game1 constructor.
On gl 3.0 with hi def i think should let you pass the z,w.
If that doesn't work id just take a guess that it is the bottom line below then by the error msg itself.
float3 N = mul(PSIn.Normal, PSIn.Position); << // truncated to x,y
float2 ret = lit(dot(N, L), dot(N, H), 1).yz; <<< // guessing this line would then error or maybe elsewere too.
The error is basically saying that ... you can't declare the z,w portion of the position variable in the pixel shader part of the shader, at the current shader level.
Or Even more directly that position when passed from the vertex shader to the pixel shader only the x,y portion is passed in the sv_position semantic. From what i gather that is because this is used for plotting to the x,y screen position. Also it gets perspective divided. That is why people pass the position 3d variable as a float4.
Think about it like this
You output a color from the pixel shader
Not a color and a position to draw at.
What is being used for the position to draw at ?
Well what the returned Position from the vertex shader is of course and it only needs pixel coordinates to plot to the screen in x,y and the color that you process to give it in the pixel shader.
Later versions with high def allow it to pass the xyzw i think, but im pretty sure those coordinates are changed to homogeneous by the time they get to the pixel shader also.
What sort of shader is that anyways is that a phong shader of some type ?