varying vec4 animLerpVposVarying;
varying vec4 uvVarying;
varying vec4 colorVarying;
uniform vec3 g_ParticleAnimFrames;
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 rot3dAnimDispUser;
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(((tmpvar_7.yzx * vec3(1.00000, 0.000000, 0.000000)) - (tmpvar_7.zxy * vec3(0.000000, 1.00000, 0.000000))));
  mat3 tmpvar_9;
  tmpvar_9[0] = tmpvar_8;
  tmpvar_9[1] = ((tmpvar_7.yzx * tmpvar_8.zxy) - (tmpvar_7.zxy * tmpvar_8.yzx));
  tmpvar_9[2] = tmpvar_7;
  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;
  vec4 tmpvar_12;
  tmpvar_12 = (color * g_vColor);
  vColor_2.w = tmpvar_12.w;
  vColor_2.xyz = (tmpvar_12.xyz + scaleIncandVid.z);
  vec4 tmpvar_13;
  tmpvar_13.w = 1.00000;
  tmpvar_13.xyz = ((((tmpvar_11 + positionNormAge.xyz) * g_vScale) + g_vParticleToWorld) * 300.000);
  vec4 tmpvar_14;
  tmpvar_14 = (tmpvar_13 * g_mViewProj);
  gl_Position = tmpvar_14;
  vec4 tmpvar_15;
  tmpvar_15.zw = vec2(0.000000, 0.000000);
  tmpvar_15.xy = (tmpvar_5 + 0.500000);
  vec4 vFrameUVs_16;
  float tmpvar_17;
  tmpvar_17 = (rot3dAnimDispUser.y * g_ParticleAnimFrames.x);
  float tmpvar_18;
  tmpvar_18 = floor(tmpvar_17);
  vec2 vFrameOffset_19;
  float tmpvar_20;
  tmpvar_20 = (float(mod (tmpvar_18, g_ParticleAnimFrames.x)));
  vFrameOffset_19.x = (float(mod (tmpvar_20, g_ParticleAnimFrames.y)));
  vFrameOffset_19.y = floor((tmpvar_20 / g_ParticleAnimFrames.y));
  vFrameUVs_16.xy = ((vFrameOffset_19 + tmpvar_15.xy) * g_ParticleAnimFrames.z);
  float fFrameIndex_21;
  fFrameIndex_21 = (tmpvar_18 + 1.00000);
  vec2 vFrameOffset_22;
  float tmpvar_23;
  tmpvar_23 = (float(mod (fFrameIndex_21, g_ParticleAnimFrames.x)));
  fFrameIndex_21 = tmpvar_23;
  vFrameOffset_22.x = (float(mod (tmpvar_23, g_ParticleAnimFrames.y)));
  vFrameOffset_22.y = floor((tmpvar_23 / g_ParticleAnimFrames.y));
  vFrameUVs_16.zw = ((vFrameOffset_22 + tmpvar_15.xy) * g_ParticleAnimFrames.z);
  vec2 tmpvar_24;
  tmpvar_24 = (((tmpvar_14.xy / tmpvar_14.w) + 1.00000) * 0.500000);
  vNormScreenPos_1.x = tmpvar_24.x;
  vNormScreenPos_1.y = (1.00000 - tmpvar_24.y);
  uvVarying = vFrameUVs_16;
  colorVarying = vColor_2;
  vec4 tmpvar_25;
  tmpvar_25.w = 0.000000;
  tmpvar_25.x = (float(mod (tmpvar_17, 1.00000)));
  tmpvar_25.yz = vNormScreenPos_1;
  animLerpVposVarying = tmpvar_25;
}

