- Inferred-lighting style dithered depth
- Only draw transparency to some pixels and then resolve after DoF.
- Should "just work" and give particle lighting (See Volition's rain for an example), but likely low quality.
- Draw particles after DoF and apply manually
- I've played with this myself but never had the best results. This solves two issues though, one the DoF destroying your particles, and 2 your particles not getting the correct DoF.
- Draw the particles and scale and blur them (or cheat with mips and pre-blurred textures) after your DoF pass.
- You can have some fun putting e.g. a hexagon in the lower mips of a flame ember particle; Gives interesting results!
- DoF pass per render batch
- Another I've played with and had interesting (but expensive) results. This works well for larger and rare objects, e.g. a glass window.
- When drawing the window, apply DoF on the background based on the window to previous depth distance. Allow the window to depth write and then apply post DoF as usual.
- This will give a fairly correct layered DoF when the far original layer written will accumulate layers of DoF.
- Using a layered depth buffer approach is likely much cheaper, correct and flexlible though! ;-)
Note how most of the below particles are actually in the foreground:
