#version 300 es
in vec4 _glesVertex;
uniform highp vec3 _WorldSpaceCameraPos;
uniform highp mat4 glstate_matrix_mvp;
uniform highp mat4 _World2Object;
uniform highp vec3 _TerrainTreeLightDirections[4];
out highp vec3 xlv_TEXCOORD2;
void main ()
{
  highp vec3 viewDir_1;
  highp vec3 tmpvar_2;
  highp vec4 tmpvar_3;
  tmpvar_3.w = 1.0;
  tmpvar_3.xyz = _WorldSpaceCameraPos;
  viewDir_1 = normalize(((_World2Object * tmpvar_3).xyz - _glesVertex.xyz));
  mediump float tmpvar_4;
  highp float tmpvar_5;
  tmpvar_5 = clamp (dot (viewDir_1, -(_TerrainTreeLightDirections[0])), 0.0, 1.0);
  tmpvar_4 = tmpvar_5;
  highp vec3 tmpvar_6;
  tmpvar_6.yz = tmpvar_2.yz;
  tmpvar_6.x = (tmpvar_4 * 2.0);
  mediump float tmpvar_7;
  highp float tmpvar_8;
  tmpvar_8 = clamp (dot (viewDir_1, -(_TerrainTreeLightDirections[1])), 0.0, 1.0);
  tmpvar_7 = tmpvar_8;
  highp vec3 tmpvar_9;
  tmpvar_9.xz = tmpvar_6.xz;
  tmpvar_9.y = (tmpvar_7 * 2.0);
  mediump float tmpvar_10;
  highp float tmpvar_11;
  tmpvar_11 = clamp (dot (viewDir_1, -(_TerrainTreeLightDirections[2])), 0.0, 1.0);
  tmpvar_10 = tmpvar_11;
  highp vec3 tmpvar_12;
  tmpvar_12.xy = tmpvar_9.xy;
  tmpvar_12.z = (tmpvar_10 * 2.0);
  tmpvar_2 = tmpvar_12;
  gl_Position = (glstate_matrix_mvp * _glesVertex);
  xlv_TEXCOORD2 = tmpvar_12;
}


// stats: 17 alu 0 tex 0 flow
// inputs: 1
//  #0: _glesVertex (high float) 4x1 [-1]
// uniforms: 4 (total size: 0)
//  #0: _WorldSpaceCameraPos (high float) 3x1 [-1]
//  #1: glstate_matrix_mvp (high float) 4x4 [-1]
//  #2: _World2Object (high float) 4x4 [-1]
//  #3: _TerrainTreeLightDirections (high float) 3x1 [4]
