varying vec4 animLerpVposVarying;
varying vec4 uvVarying;
varying vec4 colorVarying;
uniform vec3 g_vLightColorBottom;
uniform vec3 g_vLightColorTop;
uniform vec2 g_vProportionalVelocity;
uniform mat4 g_mVertexPositions;
uniform vec2 g_vParticlePivot;
uniform vec4 g_vColor;
uniform mat4 g_mViewProj;
uniform vec3 g_vParticleToWorld;
uniform vec3 g_vScale;
attribute vec4 color;
attribute vec4 velocityRotation;
attribute vec4 scaleIncandVid;
attribute vec4 positionNormAge;
void main ()
{
  vec4 vColor_1;
  vec3 vPos_2;
  int tmpvar_3;
  tmpvar_3 = int(scaleIncandVid.w);
  vec2 tmpvar_4;
  tmpvar_4 = g_mVertexPositions[tmpvar_3].xy;
  vec3 tmpvar_5;
  tmpvar_5.z = 0.000000;
  tmpvar_5.xy = (tmpvar_4 + g_vParticlePivot);
  vPos_2.z = tmpvar_5.z;
  vPos_2.x = (tmpvar_5.x * scaleIncandVid.x);
  vPos_2.y = ((tmpvar_5.y * scaleIncandVid.x) * scaleIncandVid.y);
  float tmpvar_6;
  tmpvar_6 = (velocityRotation.w * 0.0174533);
  float tmpvar_7;
  tmpvar_7 = sin(tmpvar_6);
  float tmpvar_8;
  tmpvar_8 = cos(tmpvar_6);
  mat2 tmpvar_9;
  tmpvar_9[0].x = tmpvar_8;
  tmpvar_9[0].y = -(tmpvar_7);
  tmpvar_9[1].x = tmpvar_7;
  tmpvar_9[1].y = tmpvar_8;
  vec3 tmpvar_10;
  tmpvar_10.xy = (vPos_2.xy * tmpvar_9);
  tmpvar_10.z = vPos_2.z;
  vPos_2 = tmpvar_10;
  vec3 tmpvar_11;
  tmpvar_11 = (normalize(velocityRotation.xyz) * clamp ((sqrt(dot (velocityRotation.xyz, velocityRotation.xyz)) * g_vProportionalVelocity.y), 0.000000, g_vProportionalVelocity.x));
  vec3 tmpvar_12;
  tmpvar_12 = normalize(((vec3(0.000000, 1.00000, 0.000000) * tmpvar_11.zxy) - (vec3(1.00000, 0.000000, 0.000000) * tmpvar_11.yzx)));
  mat3 tmpvar_13;
  tmpvar_13[0] = tmpvar_12;
  tmpvar_13[1] = tmpvar_11;
  tmpvar_13[2] = ((tmpvar_11.yzx * tmpvar_12.zxy) - (tmpvar_11.zxy * tmpvar_12.yzx));
  vec3 tmpvar_14;
  tmpvar_14.z = 0.000000;
  tmpvar_14.xy = tmpvar_10.xy;
  vec3 tmpvar_15;
  tmpvar_15.xy = (tmpvar_14 * tmpvar_13).xy;
  tmpvar_15.z = tmpvar_10.z;
  vec4 tmpvar_16;
  tmpvar_16 = (color * g_vColor);
  vColor_1.w = tmpvar_16.w;
  vColor_1.xyz = ((tmpvar_16.xyz * mix (g_vLightColorTop, g_vLightColorBottom, clamp (((normalize(-(tmpvar_13[2])).y + 1.00000) * 0.500000), 0.000000, 1.00000))) + (tmpvar_16.xyz * scaleIncandVid.z));
  vec4 tmpvar_17;
  tmpvar_17.w = 1.00000;
  tmpvar_17.xyz = ((((tmpvar_15 + positionNormAge.xyz) * g_vScale) + g_vParticleToWorld) * 300.000);
  gl_Position = (tmpvar_17 * g_mViewProj);
  vec4 tmpvar_18;
  tmpvar_18.zw = vec2(0.000000, 0.000000);
  tmpvar_18.xy = (tmpvar_4 + 0.500000);
  uvVarying = tmpvar_18;
  colorVarying = vColor_1;
  vec4 tmpvar_19;
  tmpvar_19.w = 0.000000;
  tmpvar_19.x = 0.000000;
  tmpvar_19.yz = vec2(0.000000, 0.000000);
  animLerpVposVarying = tmpvar_19;
}

