1. Home
  2. Docs
  3. PIDI – Planar Refle...
  4. Advanced Topics
  5. Reflection-only mode

Reflection-only mode

In some cases you may want to composite reflections on top of other effects, custom backgrounds or real video-feedback (for example, in the case of AR). For these cases there are a few shaders provided that automatically remove any backgrounds from the reflective plane leaving only the actual objects being reflected. This is achieved by testing the alpha value of the solid color that the reflection camera is clearing against or, if more precision is needed, by testing against the depth pass of the reflection.

To use them, simply set the Reflection Background on your Planar Reflection Renderer component to “Transparent”:

 

And make sure you are using a Reflection Only shader on your reflective plane. If needed, enable the Depth features in both the Caster and the Renderer. For additional flexibility, the included shader allows you to control the opacity of the final reflections so that you can more easily integrate it with any background you choose.