Projection tweak

I need a projection that is perspective on x and parallel on y.
I mean, a view frustum whose top and bottom planes are parallel. Is that possible to achieve?

Intuitively sure seems so. Prob easiest with your own frag shader as you could only do the divide for X (the perspective foreshortened one). But you may be able to cook the projection transform so it just falls out in the math (pre-mult Y by W). Take a look at the parallel and perspective projection transforms in the red book appendix and mix them together.

Also may need some thought on what perspective-correct texturing means here if that makes any difference to you.

Seems like an odd projection though. Things get squished to a vertical line instead of a point as they move away from you?

Exactly. Texturing is not needed. What about doing it in a vertex shader?

What about doing it in a vertex shader?

It’s simply a question of creating the right projection matrix.

Can you give me a hint? I’ve been trying to figure it out, but I couldn’t.

Actually, as far as I get projection matrix, it’s impossible to create such a projection matrix, which would make parallel projection alons one axis and perspective along other.
Imagine simple projection. The trick is we make W somehow proportional to Z, so you always have projection point, where all lines are going through it. But to achieve what you want you have to create such an operation, which will make perspective division only to X and Z, living Y parallel, so just like division by 1 here, so you may wish to write something like Y*Z there (to compensate perspective division), but perspective matrix is an affine transformation, so it is forbidden here.
[EDIT] You may want to do it like other people proposed - make some hacks in vertes shader, but if your tesselation is low, you would get not correct interpolation in term of your desired projection.