I split the Deferred Shading sample in a sample and a plugin. However, I could not thoroughly test it. I only use Ogre on WinXP, static-linked. There it worked.
Also I couldn't figure out how to handle the installation of the deferredshading resources.
Finally, I wasn't sure about the license. I just copied the notice that was used for the sample, but don't know if that was the right setup.
So this patch requires some more looking at, but I at least made a big with it.
I updated the patch, it is now also working on win32 dynamic linking.
I also added suppport of alpha-rejection in the deferred materials
A more recent version of the patch. (based on 2868)