varying vec4 xlv_FOG;
uniform vec4 unity_Scale;
uniform vec4 _WorldSpaceLightPos0;
uniform mat4 _TerrainEngineBendTree;
uniform vec4 _SquashPlaneNormal;
uniform float _SquashAmount;
uniform vec4 _Scale;
uniform mat4 _Object2World;
uniform vec4 _MainTex_ST;
uniform mat4 _LightMatrix0;
void main ()
{
  vec4 pos;
  pos = gl_Vertex;
  pos.xyz = (gl_Vertex.xyz * _Scale.xyz);
  vec4 tmpvar_1;
  tmpvar_1.w = 0.0;
  tmpvar_1.xyz = pos.xyz;
  pos.xyz = mix (pos.xyz, (_TerrainEngineBendTree * tmpvar_1).xyz, gl_Color.www);
  vec3 tmpvar_2;
  tmpvar_2.xz = vec2(0.0, 0.0);
  tmpvar_2.y = _SquashPlaneNormal.w;
  vec4 tmpvar_3;
  tmpvar_3.w = 1.0;
  tmpvar_3.xyz = mix ((pos.xyz + (dot (_SquashPlaneNormal.xyz, (tmpvar_2 - pos.xyz)) * _SquashPlaneNormal.xyz)), pos.xyz, vec3(_SquashAmount));
  pos = tmpvar_3;
  vec4 tmpvar_4;
  tmpvar_4 = (gl_ModelViewProjectionMatrix * tmpvar_3);
  mat3 tmpvar_5;
  tmpvar_5[0] = _Object2World[0].xyz;
  tmpvar_5[1] = _Object2World[1].xyz;
  tmpvar_5[2] = _Object2World[2].xyz;
  gl_Position = tmpvar_4;
  vec4 tmpvar_6;
  tmpvar_6.yzw = vec3(0.0, 0.0, 0.0);
  tmpvar_6.x = tmpvar_4.z;
  xlv_FOG = tmpvar_6;
  vec4 tmpvar_7;
  tmpvar_7.zw = vec2(0.0, 0.0);
  tmpvar_7.xy = ((gl_MultiTexCoord0.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
  gl_TexCoord[0] = tmpvar_7;
  vec4 tmpvar_8;
  tmpvar_8.w = 0.0;
  tmpvar_8.xyz = (tmpvar_5 * (gl_Normal * unity_Scale.w));
  gl_TexCoord[1] = tmpvar_8;
  vec4 tmpvar_9;
  tmpvar_9.w = 0.0;
  tmpvar_9.xyz = (_WorldSpaceLightPos0.xyz - (_Object2World * tmpvar_3).xyz);
  gl_TexCoord[2] = tmpvar_9;
  gl_TexCoord[3] = (_LightMatrix0 * (_Object2World * tmpvar_3));
}

