SetReplacementShader to affect only certain objects

Camera.SetReplacementShader seems to allow to render all objects whose original material contains a certain tag using a replacement shader. All objects whose original shader does not contain the specified tag do not get rendered at all.

I would like to render all objects that do not contain this specified tag using their original shader while those that do contain the tag get rendered using the replacement shader. (so, instead of not rendering objects that don’t contain the tag, they shall be rendered normally)

How can I achieve this?

Of all the features in Unity that do not work, SetReplacementShader does not work with absolute precision. 100% fail rate. Don’t use this function.

I know this is an old post but for whomever stumbles upon this i would like to try to give another more easy solution than playing with resetting materials through the whole scene and tedious stuff like that.
This is not a perfect solution and i have not fully tested it and i will not explain it fully because i’m in a hurry but at least it may give someone and idea on how to do it…
Use 2 cameras, set replacement shader in the second one, have cam1’s culling mask render everything except one layer and cam2 one render that layer(set the layer of the objects that you want the replacement shader to apply to, to it ), have cam2’s clear flag to “depth only” and it depth higher than cam1.
This seemed to work for me, hope it helps someone.