3 ms·
The particles are rendered with additive blending: gl.enable(gl.BLEND); ... gl.blendFunc(gl.SRC_ALPHA, gl.ONE); It basically means that the particle color is
by flohofwoe 12y ago
The particles are rendered with additive blending:
gl.enable(gl.BLEND);
...
gl.blendFunc(gl.SRC_ALPHA, gl.ONE);
It basically means that the particle color is added on top of the already rendered particles (with the alpha value used to modulate the particle color, which is a bit strange, it would be more usual to use gl.ONE for both parameters). The more particles overlap, the brighter that pixels becomes.
Details are explained here: https://www.opengl.org/wiki/Blending#Blend_Equations https://www.opengl.org/wiki/Blending#Blend_Equations
- flohofwoe 12y agoPlus what teraflop writes about particle velocity being proportional to their line length. The 'overbrightening effect' should be caused by the blending however.