varying highp vec2 xlv_TEXCOORD3;
varying highp vec3 xlv_TEXCOORD2;
varying highp vec3 xlv_TEXCOORD1;
varying highp vec4 xlv_COLOR0;
varying highp vec2 xlv_TEXCOORD0;
uniform mediump float _TranslucencyViewDependency;
uniform sampler2D _TranslucencyMap;
uniform mediump vec3 _TranslucencyColor;
uniform mediump float _ShadowStrength;
uniform sampler2D _MainTex;
uniform sampler2D _LightTexture0;
uniform highp vec4 _LightColor0;
uniform highp float _Cutoff;
uniform highp vec4 _Color;
uniform sampler2D _BumpSpecMap;
void main ()
{
  mediump vec4 c;
  mediump vec3 lightDir;
  mediump vec3 tmpvar_1;
  mediump float tmpvar_2;
  mediump vec4 norspc;
  mediump vec4 trngls;
  mediump vec4 c_i0;
  lowp vec4 tmpvar_3;
  tmpvar_3 = texture2D (_MainTex, xlv_TEXCOORD0);
  c_i0 = tmpvar_3;
  highp vec3 tmpvar_4;
  tmpvar_4 = ((c_i0.xyz * _Color.xyz) * xlv_COLOR0.w);
  tmpvar_1 = tmpvar_4;
  lowp vec4 tmpvar_5;
  tmpvar_5 = texture2D (_TranslucencyMap, xlv_TEXCOORD0);
  trngls = tmpvar_5;
  highp float tmpvar_6;
  tmpvar_6 = (trngls.w * _Color.x);
  tmpvar_2 = tmpvar_6;
  lowp vec4 tmpvar_7;
  tmpvar_7 = texture2D (_BumpSpecMap, xlv_TEXCOORD0);
  norspc = tmpvar_7;
  mediump vec4 normal;
  normal.xy = ((norspc.wy * 2.0) - 1.0);
  normal.z = sqrt (((1.0 - (normal.x * normal.x)) - (normal.y * normal.y)));
  mediump vec3 tmpvar_8;
  tmpvar_8 = normal.xyz;
  highp float x;
  x = (c_i0.w - _Cutoff);
  if ((x < 0.0)) {
    discard;
  };
  lightDir = xlv_TEXCOORD1;
  highp vec3 tmpvar_9;
  tmpvar_9 = normalize (xlv_TEXCOORD2);
  lowp vec4 tmpvar_10;
  tmpvar_10 = texture2D (_LightTexture0, xlv_TEXCOORD3);
  mediump vec3 viewDir;
  viewDir = tmpvar_9;
  mediump float atten;
  atten = tmpvar_10.w;
  mediump vec4 c_i0_i1;
  mediump float tmpvar_11;
  tmpvar_11 = dot (tmpvar_8, lightDir);
  mediump float tmpvar_12;
  tmpvar_12 = (pow (max (0.0, dot (tmpvar_8, normalize ((lightDir + viewDir)))), (norspc.x * 128.0)) * tmpvar_2);
  c_i0_i1.xyz = (tmpvar_1 * ((((mix (clamp (-(tmpvar_11), 0.0, 1.0), clamp (dot (viewDir, -(lightDir)), 0.0, 1.0), _TranslucencyViewDependency) * trngls.z) * _TranslucencyColor) * 2.0) + max (0.0, ((tmpvar_11 * 0.6) + 0.4))));
  highp vec3 tmpvar_13;
  tmpvar_13 = ((c_i0_i1.xyz * _LightColor0.xyz) + tmpvar_12);
  c_i0_i1.xyz = tmpvar_13;
  c_i0_i1.xyz = (c_i0_i1.xyz * mix (2.0, (atten * 2.0), _ShadowStrength));
  c = c_i0_i1;
  c.w = c_i0.w;
  gl_FragData[0] = c;
}

