Want to apply a "pre-distortion" for screen shots output in realtime

Hello!

I am working on a project which requires to projects game scenes contents on the screen, and it has to be done in real time. Instead of directly exporting screen shots, I have to apply the screen shots on a pre-defined mesh plan as its texture. The purpose of the mesh is compensating the distortion effects (such as keystone) and makes the projection on the real world looked corrected. The shape of the mesh is done by other program and would servers as a “lens” to do some pre-distortion (correction in other words) to the scenes of the game.

Step1: The original game scene screen shot, for example.


Flickr 上 picard47athd2

Step2: The mesh I created, for example.


Flickr 上 picard47atmesh

Step 3: The final result I want to have: Apply the game scene on the mesh.


Flickr 上 picard47atmesh-result

The way getting screen shots is in the following page:

http://docs.unity3d.com/Documentation/ScriptReference/Texture2D.EncodeToPNG.html

It read the screen shots and applies to a Texture2D. And what I want to do is applying the screen shot in a user defined mesh before output. Yet I am not sure whether it is possible in Unity3D, I am a beginner to Unity3D.

I also found a thread which was talking about something similar to what I want to do:

http://forum.unity3d.com/threads/54547-render-a-Texture2D-with-Graphics-DrawMesh

Thanks!

P.S. I have also considered another possible solution: Output the screen shots to disk and use another program to do the pre-distortion work. This is not a good idea since the synchronization between two programs is a problem, and the need of an extra program slow down the speed.





A new question raised:

If I create a mesh and apply the screen shoots as texture on it, would the mesh become an object in the scene? It’s something I don’t want to get.