Depth buffer access integrated into the Generic plugin (working for a few games)

Depth buffer access integrated into the Generic plugin (working for a few games)

~~(It has NVAPI libs I don't know if they really necessary. I did a quick test at work on a NVIDIA card and depth access seemed to work using these so it should be okay - as for me I'm an AMD user)~~

Works by creating a INTZ texture (backbuffer size) at plugin startup and injecting it at the SetDepthStencil stage -with the help of CreateDepthStencil in order to find the best match for the substitution-

List of tested games working : 
Stalker
Heaven Benchmark | Unigine
Return to Castle Wolfenstein (lol yeah)
Severance  Blade of Darkness
Demo ('fr-041_debris')
System Shock 2
Borderlands 2
Devil May Cry 4
Dark Souls 2 (with an offset issue)

List of tested games not working : 
Dishonored
DMC Devil May Cry
Deus Ex HR (well this one only works during cutscenes)

I adapted your 'VSSAO2.fx' so that it is able to both read from a rendertarget and from the hardware zbuffer. You might want to create a separate file I don't know. (Also I made sure DarkSouls 2 still works as intended)

I recommend trying this out with the demo « fr-041_debris ». Small exe no setup. Gorgeous. I'd really like to know if this works on NVIDIA cards 

PS : Github confuses the hell out of me. It seems old pull requests are still 'active' somehow. I hope I didn't do any mistakes and everything goes well for you. Let me know

Cheers

~~EDIT : oops almost forgot I added a filmgrain effect. It is a 'port' of Jorge Jimenez film grain. It was only for DX10/11 originally~~

EDIT : HBAO in FarCry http://abload.de/img/screenshot_2014-08-095scuc.jpg. It still get the aliasing issue. Looks like some 720p picture resized to my monitor res. Weird.

EDIT : Cleaned the commit. Should be less confusing. I'm getting an offset issue in DarkSouls 2 using the hardware depth buffer. I'm sure you'd know how to solve that : )
http://abload.de/img/clipboard-1ghz8c.jpg

EDIT : lol Zelda with HBAO : http://abload.de/img/screenshot_2014-08-09k9cbk.jpg. Crazy :p