PDA

View Full Version : what kind of processing goes into a shot like this



johndavidjack
10-31-2005, 04:47 PM
http://ps2media.ign.com/ps2/image/article/662/662886/24-the-game-20051031015613939.jpg

i'm asking about the focus effect on the far guy's face. i don't want to know how to do focus or dof effects in general, but just how that exact processing on that face is done. that fractal transform effect or whatever it is.

dorbie
10-31-2005, 11:42 PM
That kind of DOF effect is usually done by applying a convolution filter to the rendered image. Applying this filter is a matter of using multiple texture taps in a shader using the original image as a texture and displacing the filter probes based on depth information also sent as a texture to the shader, just as one example of how it can be done on modern hardware. It's actually pretty fast on modern hardware, the locality of the convolution probes which are simultaneously applied in a single pass and the efficient use of texture cache means it's pretty cheap thing to do, and of course the filter probe count can be adjusted for speed if necessary.