How would I go about generating a quad size of the screen?
I thought about computing the vertices straight in world space:
L - Lookat
E - Eye
N - (L-E)/||L-E||
and plane of quad is:
P(x,y,z) = Nx(x-Ex) + Ny(y-Ey) + Nz(z-Ez) = 0;
I used P(Ex + NEARx + Dx, Ey + NEARy + Dy, z) and solved for z for 4 corners. Two problems with that:
- It actually skews and distorts as I move the camera, so looks like there is something wrong with it.
- I can’t get Dx and Dy (distances from Eye to the edges of the screen in world).
And plus it’s too complicated I’m sure there is an elegant way. Any suggestions?