In the vertex shader code, we create the particle by offsetting the particle position in camera coordinates. Note the use of gl_VertexID to identify the quad's vertex:
layout (location = 0) in vec3 VertexInitVel; // Particle initial velocitylayout (location = 1) in float VertexBirthTime; // Particle birth timeout float Transp; // Transparency of the particleout vec2 TexCoord; // Texture coordinateuniform float Time; // Animation timeuniform vec3 Gravity; // Gravity vector in world coordsuniform float ParticleLifetime; // Max particle lifetimeuniform float ParticleSize; // Particle sizeuniform vec3 EmitterPos; // Emitter position in world coordinates// Transformation matricesuniform mat4 MV, Proj;// Offsets to the position ...