varying vec4 animLerpVposVarying;
varying vec4 uvVarying;
varying vec4 colorVarying;
uniform vec3 g_vLightColorBottom;
uniform vec3 g_vLightColorTop;
uniform vec3 g_vBillboardNormal;
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 ()
{
  vec2 vNormScreenPos_1;
  vec4 vColor_2;
  vec3 vPos_3;
  int tmpvar_4;
  tmpvar_4 = int(scaleIncandVid.w);
  vec2 tmpvar_5;
  tmpvar_5 = g_mVertexPositions[tmpvar_4].xy;
  vec3 tmpvar_6;
  tmpvar_6.z = 0.000000;
  tmpvar_6.xy = (tmpvar_5 + g_vParticlePivot);
  vPos_3.z = tmpvar_6.z;
  vPos_3.x = (tmpvar_6.x * scaleIncandVid.x);
  vPos_3.y = ((tmpvar_6.y * scaleIncandVid.x) * scaleIncandVid.y);
  vec3 tmpvar_7;
  tmpvar_7 = normalize(velocityRotation.xyz);
  vec3 tmpvar_8;
  tmpvar_8 = normalize(((g_vBillboardNormal.yzx * tmpvar_7.zxy) - (g_vBillboardNormal.zxy * tmpvar_7.yzx)));
  mat3 tmpvar_9;
  tmpvar_9[0] = tmpvar_8;
  tmpvar_9[1] = tmpvar_7;
  tmpvar_9[2] = ((tmpvar_7.yzx * tmpvar_8.zxy) - (tmpvar_7.zxy * tmpvar_8.yzx));
  vec3 tmpvar_10;
  tmpvar_10.z = 0.000000;
  tmpvar_10.xy = vPos_3.xy;
  vec3 tmpvar_11;
  tmpvar_11.xy = (tmpvar_10 * tmpvar_9).xy;
  tmpvar_11.z = vPos_3.z;
  vec3 tmpvar_12;
  tmpvar_12 = (tmpvar_11 + positionNormAge.xyz);
  vec4 tmpvar_13;
  tmpvar_13 = (color * g_vColor);
  vColor_2.w = tmpvar_13.w;
  vec3 tmpvar_14;
  tmpvar_14.z = 0.000000;
  tmpvar_14.x = vPos_3.x;
  tmpvar_14.y = vPos_3.y;
  vColor_2.xyz = ((tmpvar_13.xyz * mix (g_vLightColorTop, g_vLightColorBottom, clamp (((normalize((-(normalize(tmpvar_12)) + (2.00000 * (normalize(tmpvar_14) * tmpvar_9)))).y + 1.00000) * 0.500000), 0.000000, 1.00000))) + (tmpvar_13.xyz * scaleIncandVid.z));
  vec4 tmpvar_15;
  tmpvar_15.w = 1.00000;
  tmpvar_15.xyz = (((tmpvar_12 * g_vScale) + g_vParticleToWorld) * 300.000);
  vec4 tmpvar_16;
  tmpvar_16 = (tmpvar_15 * g_mViewProj);
  gl_Position = tmpvar_16;
  vec4 tmpvar_17;
  tmpvar_17.zw = vec2(0.000000, 0.000000);
  tmpvar_17.xy = (tmpvar_5 + 0.500000);
  vec2 tmpvar_18;
  tmpvar_18 = (((tmpvar_16.xy / tmpvar_16.w) + 1.00000) * 0.500000);
  vNormScreenPos_1.x = tmpvar_18.x;
  vNormScreenPos_1.y = (1.00000 - tmpvar_18.y);
  uvVarying = tmpvar_17;
  colorVarying = vColor_2;
  vec4 tmpvar_19;
  tmpvar_19.w = 0.000000;
  tmpvar_19.x = 0.000000;
  tmpvar_19.yz = vNormScreenPos_1;
  animLerpVposVarying = tmpvar_19;
}

