þ:    :                SPOT   SHADOWS_DEPTH   SHADOWS_NATIVEÒ  !!GLES


#ifdef VERTEX

#extension GL_EXT_shadow_samplers : enable
attribute vec4 _glesVertex;
attribute vec3 _glesNormal;
uniform highp vec4 _ProjectionParams;
uniform highp mat4 glstate_matrix_mvp;
uniform highp mat4 glstate_matrix_modelview0;
uniform highp float _LightAsQuad;
varying highp vec4 xlv_TEXCOORD0;
varying highp vec3 xlv_TEXCOORD1;
void main ()
{
  highp vec4 tmpvar_1;
  tmpvar_1 = (glstate_matrix_mvp * _glesVertex);
  highp vec4 o_2;
  highp vec4 tmpvar_3;
  tmpvar_3 = (tmpvar_1 * 0.5);
  highp vec2 tmpvar_4;
  tmpvar_4.x = tmpvar_3.x;
  tmpvar_4.y = (tmpvar_3.y * _ProjectionParams.x);
  o_2.xy = (tmpvar_4 + tmpvar_3.w);
  o_2.zw = tmpvar_1.zw;
  gl_Position = tmpvar_1;
  xlv_TEXCOORD0 = o_2;
  xlv_TEXCOORD1 = mix (((glstate_matrix_modelview0 * _glesVertex).xyz * vec3(-1.0, -1.0, 1.0)), _glesNormal, vec3(_LightAsQuad));
}



#endif
#ifdef FRAGMENT

#extension GL_EXT_shadow_samplers : enable
uniform highp vec3 _WorldSpaceCameraPos;
uniform highp vec4 _ProjectionParams;
uniform highp vec4 _ZBufferParams;
uniform highp mat4 unity_World2Shadow[4];
uniform mediump vec4 _LightShadowData;
uniform highp vec4 unity_ShadowFadeCenterAndType;
uniform mediump vec4 unity_ColorSpaceLuminance;
uniform highp sampler2D _CameraDepthTexture;
uniform highp vec4 _LightPos;
uniform highp vec4 _LightColor;
uniform highp vec4 unity_LightmapFade;
uniform highp mat4 _CameraToWorld;
uniform highp mat4 _LightMatrix0;
uniform sampler2D _LightTextureB0;
uniform sampler2D _LightTexture0;
uniform lowp sampler2DShadow _ShadowMapTexture;
uniform sampler2D _CameraNormalsTexture;
varying highp vec4 xlv_TEXCOORD0;
varying highp vec3 xlv_TEXCOORD1;
void main ()
{
  lowp vec4 tmpvar_1;
  mediump vec4 res_2;
  highp float spec_3;
  mediump vec3 h_4;
  mediump vec4 nspec_5;
  highp float atten_6;
  mediump vec3 lightDir_7;
  highp vec2 tmpvar_8;
  tmpvar_8 = (xlv_TEXCOORD0.xy / xlv_TEXCOORD0.w);
  highp vec4 tmpvar_9;
  tmpvar_9 = texture2D (_CameraDepthTexture, tmpvar_8);
  highp vec4 tmpvar_10;
  tmpvar_10.w = 1.0;
  tmpvar_10.xyz = ((xlv_TEXCOORD1 * (_ProjectionParams.z / xlv_TEXCOORD1.z)) * (1.0/((
    (_ZBufferParams.x * tmpvar_9.x)
   + _ZBufferParams.y))));
  highp vec3 tmpvar_11;
  tmpvar_11 = (_CameraToWorld * tmpvar_10).xyz;
  highp vec3 tmpvar_12;
  tmpvar_12 = (tmpvar_11 - unity_ShadowFadeCenterAndType.xyz);
  highp float tmpvar_13;
  tmpvar_13 = mix (tmpvar_10.z, sqrt(dot (tmpvar_12, tmpvar_12)), unity_ShadowFadeCenterAndType.w);
  highp vec3 tmpvar_14;
  tmpvar_14 = (_LightPos.xyz - tmpvar_11);
  highp vec3 tmpvar_15;
  tmpvar_15 = normalize(tmpvar_14);
  lightDir_7 = tmpvar_15;
  highp vec4 tmpvar_16;
  tmpvar_16.w = 1.0;
  tmpvar_16.xyz = tmpvar_11;
  highp vec4 tmpvar_17;
  tmpvar_17 = (_LightMatrix0 * tmpvar_16);
  lowp float tmpvar_18;
  tmpvar_18 = texture2DProj (_LightTexture0, tmpvar_17).w;
  atten_6 = tmpvar_18;
  highp float tmpvar_19;
  tmpvar_19 = (dot (tmpvar_14, tmpvar_14) * _LightPos.w);
  lowp vec4 tmpvar_20;
  tmpvar_20 = texture2D (_LightTextureB0, vec2(tmpvar_19));
  atten_6 = ((atten_6 * float(
    (tmpvar_17.w < 0.0)
  )) * tmpvar_20.w);
  mediump float tmpvar_21;
  highp vec4 tmpvar_22;
  tmpvar_22.w = 1.0;
  tmpvar_22.xyz = tmpvar_11;
  highp vec4 tmpvar_23;
  tmpvar_23 = (unity_World2Shadow[0] * tmpvar_22);
  lowp float tmpvar_24;
  lowp float tmpvar_25;
  tmpvar_25 = shadow2DProjEXT (_ShadowMapTexture, tmpvar_23);
  mediump float tmpvar_26;
  tmpvar_26 = tmpvar_25;
  mediump float tmpvar_27;
  tmpvar_27 = (_LightShadowData.x + (tmpvar_26 * (1.0 - _LightShadowData.x)));
  tmpvar_24 = tmpvar_27;
  highp float tmpvar_28;
  tmpvar_28 = clamp ((tmpvar_24 + clamp (
    ((tmpvar_13 * _LightShadowData.z) + _LightShadowData.w)
  , 0.0, 1.0)), 0.0, 1.0);
  tmpvar_21 = tmpvar_28;
  highp float tmpvar_29;
  tmpvar_29 = (atten_6 * tmpvar_21);
  atten_6 = tmpvar_29;
  lowp vec4 tmpvar_30;
  tmpvar_30 = texture2D (_CameraNormalsTexture, tmpvar_8);
  nspec_5 = tmpvar_30;
  mediump vec3 tmpvar_31;
  tmpvar_31 = normalize(((nspec_5.xyz * 2.0) - 1.0));
  mediump float tmpvar_32;
  tmpvar_32 = max (0.0, dot (lightDir_7, tmpvar_31));
  highp vec3 tmpvar_33;
  tmpvar_33 = normalize((lightDir_7 - normalize(
    (tmpvar_11 - _WorldSpaceCameraPos)
  )));
  h_4 = tmpvar_33;
  mediump float tmpvar_34;
  tmpvar_34 = pow (max (0.0, dot (h_4, tmpvar_31)), (nspec_5.w * 128.0));
  spec_3 = tmpvar_34;
  highp float tmpvar_35;
  tmpvar_35 = (spec_3 * clamp (tmpvar_29, 0.0, 1.0));
  spec_3 = tmpvar_35;
  highp vec3 tmpvar_36;
  tmpvar_36 = (_LightColor.xyz * (tmpvar_32 * tmpvar_29));
  res_2.xyz = tmpvar_36;
  mediump vec3 c_37;
  c_37 = _LightColor.xyz;
  mediump float tmpvar_38;
  tmpvar_38 = dot (c_37, unity_ColorSpaceLuminance.xyz);
  highp float tmpvar_39;
  tmpvar_39 = (tmpvar_35 * tmpvar_38);
  res_2.w = tmpvar_39;
  highp float tmpvar_40;
  tmpvar_40 = clamp ((1.0 - (
    (tmpvar_13 * unity_LightmapFade.z)
   + unity_LightmapFade.w)), 0.0, 1.0);
  mediump vec4 tmpvar_41;
  tmpvar_41 = (res_2 * tmpvar_40);
  res_2 = tmpvar_41;
  tmpvar_1 = tmpvar_41.wxyz;
  gl_FragData[0] = tmpvar_1;
}



#endif                          