uniform sampler2D _BumpSpecMap;
uniform highp vec4 _Color;
uniform highp float _Cutoff;
uniform highp vec4 _LightColor0;
uniform sampler2D _LightTexture0;
uniform sampler2D _MainTex;
uniform mediump float _ShadowStrength;
uniform mediump vec3 _TranslucencyColor;
uniform sampler2D _TranslucencyMap;
uniform mediump float _TranslucencyViewDependency;
varying highp vec2 xlv_TEXCOORD0;
varying highp vec4 xlv_COLOR0;
varying highp vec3 xlv_TEXCOORD1;
varying highp vec3 xlv_TEXCOORD2;
varying highp vec2 xlv_TEXCOORD3;
void main ()
{
  mediump vec4 c_1;
  mediump vec3 lightDir_2;
  mediump vec3 tmpvar_3;
  mediump float tmpvar_4;
  mediump vec4 norspc_5;
  mediump vec4 trngls_6;
  mediump vec4 c_7;
  lowp vec4 tmpvar_8;
  tmpvar_8 = texture2D (_MainTex, xlv_TEXCOORD0);
  c_7 = tmpvar_8;
  tmpvar_3 = ((c_7.xyz * _Color.xyz) * xlv_COLOR0.w);
  lowp vec4 tmpvar_9;
  tmpvar_9 = texture2D (_TranslucencyMap, xlv_TEXCOORD0);
  trngls_6 = tmpvar_9;
  tmpvar_4 = (trngls_6.w * _Color.x);
  lowp vec4 tmpvar_10;
  tmpvar_10 = texture2D (_BumpSpecMap, xlv_TEXCOORD0);
  norspc_5 = tmpvar_10;
  mediump vec4 normal_11;
  normal_11.xy = ((norspc_5.wy * 2.0) - 1.0);
  normal_11.z = sqrt(((1.0 - 
    (normal_11.x * normal_11.x)
  ) - (normal_11.y * normal_11.y)));
  highp float x_12;
  x_12 = (c_7.w - _Cutoff);
  if ((x_12 < 0.0)) {
    discard;
  };
  lightDir_2 = xlv_TEXCOORD1;
  highp vec3 tmpvar_13;
  tmpvar_13 = normalize(xlv_TEXCOORD2);
  lowp vec4 tmpvar_14;
  tmpvar_14 = texture2D (_LightTexture0, xlv_TEXCOORD3);
  mediump vec3 viewDir_15;
  viewDir_15 = tmpvar_13;
  mediump float atten_16;
  atten_16 = tmpvar_14.w;
  mediump vec4 c_17;
  mediump float tmpvar_18;
  tmpvar_18 = dot (normal_11.xyz, lightDir_2);
  c_17.xyz = (tmpvar_3 * ((
    ((mix (clamp (
      -(tmpvar_18)
    , 0.0, 1.0), clamp (
      dot (viewDir_15, -(lightDir_2))
    , 0.0, 1.0), _TranslucencyViewDependency) * trngls_6.z) * _TranslucencyColor)
   * 2.0) + max (0.0, 
    ((tmpvar_18 * 0.6) + 0.4)
  )));
  c_17.xyz = ((c_17.xyz * _LightColor0.xyz) + (pow (
    max (0.0, dot (normal_11.xyz, normalize((lightDir_2 + viewDir_15))))
  , 
    (norspc_5.x * 128.0)
  ) * tmpvar_4));
  c_17.xyz = (c_17.xyz * mix (2.0, (atten_16 * 2.0), _ShadowStrength));
  c_1.xyz = c_17.xyz;
  c_1.w = c_7.w;
  gl_FragData[0] = c_1;
}


// stats: 40 alu 5 tex 1 flow
// inputs: 5
//  #0: xlv_TEXCOORD0 (high float) 2x1 [-1]
//  #1: xlv_COLOR0 (high float) 4x1 [-1]
//  #2: xlv_TEXCOORD1 (high float) 3x1 [-1]
//  #3: xlv_TEXCOORD2 (high float) 3x1 [-1]
//  #4: xlv_TEXCOORD3 (high float) 2x1 [-1]
// uniforms: 6 (total size: 0)
//  #0: _Color (high float) 4x1 [-1]
//  #1: _Cutoff (high float) 1x1 [-1]
//  #2: _LightColor0 (high float) 4x1 [-1]
//  #3: _ShadowStrength (medium float) 1x1 [-1]
//  #4: _TranslucencyColor (medium float) 3x1 [-1]
//  #5: _TranslucencyViewDependency (medium float) 1x1 [-1]
// textures: 4
//  #0: _BumpSpecMap (low 2d) 0x0 [-1]
//  #1: _LightTexture0 (low 2d) 0x0 [-1]
//  #2: _MainTex (low 2d) 0x0 [-1]
//  #3: _TranslucencyMap (low 2d) 0x0 [-1]
