normalWS = normalize(cross(ddy(IN.positionWS), ddx(IN.positionWS)));
Unity documentation is wrong when it explains _ScreenParams, and _ScreenSize is not documented. _ScreenParams contains the actual screen size, while _ScreenSize contains the size of the camera’s target texture. This is important because the camera's texture (the buffer) can vary with Render Scale. Also, note that the .z and .w components are calculated differently.