Implement compute-shader simulation of particles!
[lovr-particles] / shaders / particles.frag
1 in vec2 uv;
2
3 vec4 color(vec4 graphicsColor, sampler2D image, vec2 _uv) {
4 float alpha = 1.0 - (distance(uv, vec2(0.5)) * 2.0);
5 graphicsColor.a *= sqrt(clamp(alpha, 0.0, 1.0));
6 return graphicsColor;
7 }