I've been using this script and shader from the wiki, and they work wonders; my only problem is using them in deferred rendering.
Now, the way this shader works is by writing to the depth buffer to hide anything behind an object with this shader applied, but for some reason this wasn't working when I tried to use deferred rendering for shadows and better lighting. The problem is addressed by Kuba in the final post of this topic.
The final pass of prepass rendering (the part that renders geometry the second time and applies the result of the lighting pass to it) is rendered in to a texture, then blit-copied into the back buffer, which overrides everything that was rendered there before.
My question is if there is any way to render after that final pass, so I can still use my depth mask to hide objects behind it. If there is no way to directly write after the final pass, is there another solution I can try? Perhaps blending the two cameras on my own and some how blitting that on to the screen?