Per vertex camera matrix?

I may be overthinking this…

But it seems like standard projection mapping tricks like Malcolm’s ‘parallax mapping’ [url]Parallax Kinect Sample - Shared .tox Components - TouchDesigner forum rely on a projection matrix that is constant across the ‘screen’ i.e. that the screen is a single plane*

What if it’s not? (We have a mini CAVE with a curved wall). It seems to me that in every vertex, instead of just using the camera matrix etc. I should be able to use the camera world position and the screen pixel/vertex world position and work out the projection angle and therefore the geometry?

I’m aware of the standard method - making a fake plane and using perspective from camera, but the resolution loss is pretty severe.

Am I way off base?

Oh. I would have to run this from every pixel, not every vertex? The vertex shader runs for every vertex in the object that is being drawn but that has no connection to the ‘screen’ object. I’d have to calculate for every pixel from camera (a point) through the pixel’s work coord and therefore to the correct piece of geometry?

The goal is that geometry ‘at’ the same place as the screen will appear to be locked to the screen.

Would this bork lighting and everything like that? I can see that texturing would survive fine, and any vertex attributes, but would the lack of a ‘real’ camera matrix break everything else?

Bruce

  • Making an asymmetric projection frustum that leaves that one plane in space untouched