MirrorReflection4

Author: Aras Pranckevicius

Note
This script / shader should work with Unity 4.x & 5.0. See also: Mirror Reflection for Unity 3.x.

Description
This is shader+script to make perfectly reflective mirrors, for Unity 4.x & 5.0. Use the FX/Mirror Reflection shader on an object, attach the MirrorReflection script to it and there you are.

Usage
Prerequisites: This technique requires Unity 4.x Pro.


 * Create a material that uses the shader below (FX/Mirror Reflection)
 * Use this material on a plane-like (i.e. flat) object.
 * Set this object to use Water layer.
 * Attach the MirrorReflection 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.

Changelog

 * 2015 March 20 Fixed for scaled mirror objects.
 * 2015 February 25 Updated shader & script to work with Unity 5.0 too.