MirrorReflection

Author: Aras Pranckevicius

Description
This is shader+script to make perfectly reflective mirrors for Unity 1.x. Use the Mirror Reflection material on an object, attach the MirrorReflectionScript to it and there you are.

Works on vertex program capable hardware (Radeon 8500, GeForce3/4Ti, Intel 9xx). Requires Unity 1.x Pro.

Notes: this is for Unity 1.x! For a more modern version, see Mirror Reflection for Unity 4/5!

Usage
Prerequisites: This technique requires Unity Pro. The script requires ReflectionRenderTexture script to be somewhere in the project. ReflectionRenderTexture is part of Pro Standard Assets, placed in Pro Standard Assets/Water/Sources.


 * Create a material that uses the shader below (FX/Mirror Reflection)
 * Use this material on a plane-like (i.e. flat) object.
 * Attach the MirrorReflectionScript to the same object.

Notes:
 * The reflection happens along object's "up" direction (green axis in the scene view). E.g. the builtin plane object is suitable for use as a mirror. If you experience weird reflection, check whether your mirror object is oriented correctly.
 * Reflection calculations use Main Camera (i.e. camera tagged as Main Camera). Be careful not to have multiple cameras tagged as Main in the scene, as you won't know which one is picked up!

Example
A small package including an example scene showing MirrorReflection can be found here:
 * [[Media:MirrorReflection.unityPackage.zip|MirrorReflection.unityPackage.zip]]