Credits: technique adapted fromGPU Gems 3 book Chapter 28. "Practical Post-Process Depth of Field". Earl Hammon Jr. Infinity Ward
New technique for Depth of Field. Works better on foreground objects.
Technique developped by Infinity Ward for Call of Duty 4: Modern Warfare that provides depth of field's key qualitative features in both the foreground and the background with minimal impact on total system performance or engine architecture. Requires Shader Model 2.0 hardware.
new blur technique: gaussian blur (modified to blur correctly non square textures). better blur quality and also improved performances.
Technique for rendering depth-of-field effects in realtime using image processing and compositing techniques with Poisson disc filtering. The use of a pre-blurred image in the post-processing step improves image quality by reducing aliasing artifacts. There are user friendly parameters for plane distance controls.
WOW and many thanks+++++++++
hope to find a way to improve this technique (should be easier with dx10/11), DOF is amazing...
this seems to be almost perfect:
look at the "Ladybug" section
this looks great!
Unfortunately i can't get it to work. When i open your help patch the big rendering window stays black except for the perfmeter. I only can see the color and depth pre-renderings. Tried it with 40beta23 and 45beta24. Same results.
Do you have an idea why that could be wrong?
I have the same problem as rosenfranz no image in larger render window.
Could it be our graphic cards not supporting some of the functions ?
Hello, sorry for the late reply...
@john and rosenfranz:
what's your graphic card?
i just tried it on my ati 4950 and had to change the vertex shader-version to 3_0 to get it to work. happens all the time, always gets things working.
VertexShader = compile vs_3_0 VSDOF();
my laptop GPU is "ATI Mobility Radeon HD 3650"
the help patches are working now after following the suggestion of frostpfote:
changing the version from 1 to 3 at the end of the code for 'DOF-combine.fx'
Can someone explain the need for this change ?
Is it specific to my hardware ?
and why don't I have to change the version in some of the other fx used in this module ?
Really great effect dottore ! Thankyou so much for sharing !
ahh. just saw that something happened here. cool.
Also tried to change the vertex shader version. still no effect.
@dottore: my gfx card is a radeon x800gt. Read somewhere that this card uses pixelshader version 2.0. maybe that is the problem?
i also tried to change the PS version from 3.0 to 2.0. Didn't change anything. Besides I think that your shader needs version 3.0 right?
I was just having probs with this effect again as described in the top post ,curiously version 1.1 is not working for me but v1.0 works fine after the suggested change of pixel shader version.
thanks for update. :)
looks great ;)
anonymous user login