1-point, 2-point, and 3-point perspective are all covered by the standard projection matrix in 3D rendering - the difference is mainly an aid to artists working at different camera angles, e.g. aligned or not aligned with coordinate axes. A 2-point perspective setup basically means the camera is fixed to look horizontally and can’t tilt up and down, like in Doom. So your formula should work for one camera direction if it works for any other, I’d think.

I’m using the following to get my ray vector from the view port pixel for perspective projection (y is the up/dn axis, not z). Is it possible to modify it for two point perspective? Thanks.