  */
 fixed4 frag_pcss (v2f i) : SV_Target
 {
+	//only works in 5.6+
+#if UNITY_VERSION >= 560
     UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); // required for sampling the correct slice of the shadow map render texture array
+#endif
 
 	float3 vpos = computeCameraSpacePosFromDepth(i);
 

v2f vert (appdata v)
{
	v2f o;
	UNITY_SETUP_INSTANCE_ID(v);
	UNITY_TRANSFER_INSTANCE_ID(v, o);
	UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
	float4 clipPos = UnityObjectToClipPos(v.vertex);
	o.pos = clipPos;
	o.uv.xy = v.texcoord;

{
	float4 vertex : POSITION;
	float2 texcoord : TEXCOORD0;
#if (UNITY_VERSION < 560)
	float3 ray : NORMAL;
#elif defined(UNITY_STEREO_INSTANCING_ENABLED)
	float3 ray[2] : TEXCOORD1;
#else
	float3 ray : TEXCOORD1;
