Posted 23 October 2001 - 09:05 PM
Lastnight I sat down and had a think about how to produce a realtime warping effect on the scene being rendered in my engine. Just wanting to know what people think of the idea (I havent seen it mentioned anywhere, but then I also havent looked, so forgive me if this idea has been used elsewhere).
We all know about copying an image from the frame buffer to a texture (basically rendering to a texture), and we know about 2D rendering using an orthographic projection, so here goes.
My idea was to render a scene and copy the image to a texture, then stretch the texture over a grid of polygons which covers the entire screen. Now we have the scene being drawn to the screen and looking almost identical to how it is when we just render the scene normally. Now if we begin shifting vertices on the grid we have a warping effect over the image, and we are doing it in realtime.
Now personally I wouldnt use this technique for every frame rendered in a game, as the quality of the texture isnt as good as a frame that has been rendered directly, and the speed of it is also quit a bit slower (~20fps slower in my tests). It would be more of a drugged effect that is only temporary or such.
Anyone got any ideas or comments on this?
Edited by - Maximus on October 24, 2001 9:18:45 AM