uniform float _Cutoff;
uniform vec4 _LightShadowData;
uniform vec4 _LightSplitsFar;
uniform vec4 _LightSplitsNear;
uniform sampler2D _MainTex;
uniform vec4 _ProjectionParams;
uniform sampler2D _ShadowMapTexture;
void main ()
{
  vec2 tmpvar_1;
  tmpvar_1 = gl_TexCoord[4].xy;
  vec4 res_2;
  vec4 weights_3;
  float x_4;
  x_4 = ((texture2D (_MainTex, gl_TexCoord[5].xy).w * gl_Color.w) - _Cutoff);
  if ((x_4 < 0.0)) {
    discard;
  };
  weights_3 = (vec4(greaterThanEqual (tmpvar_1.xxxx, _LightSplitsNear)) * vec4(lessThan (tmpvar_1.xxxx, _LightSplitsFar)));
  vec4 tmpvar_5;
  tmpvar_5.w = 1.0;
  tmpvar_5.xyz = (((
    (gl_TexCoord[0].xyz * weights_3.x)
   + 
    (gl_TexCoord[1].xyz * weights_3.y)
  ) + (gl_TexCoord[2].xyz * weights_3.z)) + (gl_TexCoord[3].xyz * weights_3.w));
  vec4 tmpvar_6;
  tmpvar_6 = texture2D (_ShadowMapTexture, tmpvar_5.xy);
  float tmpvar_7;
  if ((tmpvar_6.x < tmpvar_5.z)) {
    tmpvar_7 = _LightShadowData.x;
  } else {
    tmpvar_7 = 1.0;
  };
  res_2.x = clamp ((tmpvar_7 + clamp (tmpvar_1.y, 0.0, 1.0)), 0.0, 1.0);
  res_2.y = 1.0;
  vec2 enc_8;
  enc_8 = (vec2(1.0, 255.0) * (1.0 - (tmpvar_1.xxxx * _ProjectionParams.w)).x);
  vec2 tmpvar_9;
  tmpvar_9 = fract(enc_8);
  enc_8.y = tmpvar_9.y;
  enc_8.x = (tmpvar_9.x - (tmpvar_9.y * 0.00392157));
  res_2.zw = enc_8;
  gl_FragData[0] = res_2;
}


// stats: 28 alu 3 tex 2 flow
// inputs: 2
//  #0: gl_Color (high float) 4x1 [-1] loc 1
//  #1: gl_TexCoord (high float) 4x1 [6] loc 4
// uniforms: 5 (total size: 0)
//  #0: _Cutoff (high float) 1x1 [-1]
//  #1: _LightShadowData (high float) 4x1 [-1]
//  #2: _LightSplitsFar (high float) 4x1 [-1]
//  #3: _LightSplitsNear (high float) 4x1 [-1]
//  #4: _ProjectionParams (high float) 4x1 [-1]
// textures: 2
//  #0: _MainTex (high 2d) 0x0 [-1]
//  #1: _ShadowMapTexture (high 2d) 0x0 [-1]
