The idea is to render the whole scene except the particles in a render target, then draw the whole scene again. In the particles fragment shader we then use the RT depth and opacity to adjust the particles alpha, as seen in this codepen: https://codepen.io/martinlaxenaire/pen/rNXQeKd

6/9

Comments