For each pixel, I calculate how much exposure it receives during the last 1/60th of a second (assuming it runs at 60 FPS). So, if a pixel is backed by the triangle for 100%, it gets the full colour. If it's only 24% of the time, then it's 24% of the full colour, etc.
That's what happens conceptually. In order for it to run faster, I have to optimize the solution and basically calculate the same result, but by drawing some triangles and calculating some distances... It's hard to explain, but it's nothing more than an optimization.