Rendering to textures, also known as off-screen rendering, is a technique where all of the output produced by the renderer is stored as a texture instead of being displayed on the screen. Then, this texture can be used on top of other objects to achieve some interesting effects.
I recently improved Crimild to support this feature. As an example, take a look at the following pictures:
This example renders an iPhone device in which screen the ED-209 robot from the movie Robocop can be seen.
The effect is produced by rendering the robot first, using the new rendering to texture feature to draw everything into an off-screen buffer. Then, two quads are drawn: one by using a texture with a picture of an iPhone device and the other by using the contents of the offscreen buffer.
Although the images above may not be impressive, this is a mayor improvement since it’s the closer step towards post-processing effects like anti-allising, jittering, bloom, etc.
For those interested in the details of how this feature is used, the RenderToTexture example project can be found in the examples directory.
As a bonus, I managed to implement rendering to texture on iPhone as well. This feature is used in exactly the same way as in other platforms:
The OffscreenRendering example project is available in the examples/iPhone directory.