@chrono Actually depth-of-field is not that hard to do. The only thing you need it the depth information of the rendered scene. You can get this information directly on DirectX 10/11 or render the depth yourself in DirectX 9. (dunno about OpenGL, but should be similar).

After having the depth info it's just a simple blur-math-calculation with respect to the depth.


@bazbazus
If you know how to render 3D scenes and do some pixel(fragment) and vertex shader stuff, this should be a fairly easy implementation.
If you are working 2D if you are working 2D you can apply the same trick.