I started working on this yesterday after I released Meadow. It is by no means perfect yet but I am already getting some pretty cool results.
For those of you that don't know what this is. It is a method of fading out pixel to stop things like billboard intersections( where the particles clip the floor for example and you get that ugly line ).
Here it is explained in Microspiel:
Particle systems are a common method for creating volumetric effects in games. They can be used to simulate such things as fire, cloudes, smoke, dust, glowing projectiles, magic spells, and so on. A common technique is to use 2D camera-aligned quads centered at each particle to represent the volume that the particle represents. Because the quads follow the camera, they give the illusion of a substance filling a 3D volume. However, this illusion often breaks down when the 2D sprites used to visualize the particles intersect with the world geometry. The intersection of the 2D quad with the 3D world geometry creates a hard, straight line — on one side of the line is particle, and on the other is world geometry.
In order to lessen this, we can take a simple 4-step approach.
1: Render the world geometry, without the particles, to a floating buffer as depth.
2: Inside a vertex program, calculate the depth of each particle.
3: Compare the two depth values for discontinuities inside a fragment program.
4: Modify the alpha of the resulting pixel according and dump it to the screen.
Microsoft explain this with a diagram.
In the basic flat particle system, the line where the particle quad intersects the geometry is a giveaway that the particles are not actually 3D. To avoid this, the sample can read back the depth buffer as a texture. In the shader, this depth value is sampled and tested against the depth value being rendered for the current pixel in the particle. The alpha value increases as the difference between the depth value in the buffer, and then depth being written out from the pixel shader decreases. Therefore, the particle becomes more transparent as it approaches intersection with the scene geometry.
.jpg)
We can see this at work in TV3D. The following images are always a mirror. The one on the left is TV's standard hard billboard particles and the one on the right is the exact same particles with a soft shader on them. Notice the intersects on the left side are not present on the right.
[click for 1920x1080]

Now, as I said, I haven't finished this yet. I am still getting artifacts along certain things, particularly that back wall. As can be seen here:
[click for 1920x1080]

I intend to get rid of those before I release source. Now, if I fill the floor of the room with particles, you can see that the standard hard-edged particles just don't stand a chance. Whereas the soft particles look quite nice, minus that current bug of course.
[click for 1920x1080]
