Last week I was doing some testing with custom render components and I ended up creating a new demo that implements a reflections. You can see the results in the next image:
Long story short, I’m using a custom render component that creates a reflection of a given scene in four steps. The first step is to render the base plane (the one that will be used to reflect the scene) into the stencil buffer. Then, we render the reflected scene using the stencil buffer information to clip those portions of the reflection that lie outside of the base plane. The reflection illusion is created by rendering the scene upside-down.
The third step is to render the actual scene. No special process is required here:
The last step is to render the base plane again, this time enabling textures and lighting. In addition, we’re going to use forward-to-back blending, creating the illusion of a polished surface and producing the final effect.
The source code for this example can be found in the examples/Reflections directory. The custom render component used in this example is not as generic as I would like it to be, but it can be easily modified to suite any scene if required.