问题 I am trying to make a particle system where instead of a texture, a quad is rendered by a fragment shader such as below. uniform vec3 color; uniform float radius; uniform float edge; uniform vec2 position; uniform float alpha; void main() { float dist = distance(gl_FragCoord.xy, position); float intensity = smoothstep(dist-edge, dist+edge, radius); gl_FragColor = vec4(color, intensity*alpha); } Each particle is an object of a c++ class that wraps this shader and all the variables together and