  */
 fixed4 frag_hard (v2f i) : SV_Target
 {
-    UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); // required for sampling the correct slice of the shadow map render texture array
+	//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;

	return o;
}

//changed in 5.6
#if UNITY_VERSION >= 560
	UNITY_DECLARE_DEPTH_TEXTURE(_CameraDepthTexture);
#else
	sampler2D_float _CameraDepthTexture;
#endif

// sizes of cascade projections, relative to first one
float4 unity_ShadowCascadeScales;
