For HDRP you have to make this a custom post process.
https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@7.1/manual/Custom-Post-Process.html
The approach used above is the legacy Built In Rendering Path image effect method … because it’s from 6 years ago and predates even the current BIRP Post Processing Stack stuff which is similarish to what the HDRP uses.
Yeah … that’s going to be a hard nope.
Some VR games do use outline methods similar to this (the PC version of Echo Arena for example), but you have to use TAA at the same time to get clean outlines. And Unity’s TAA is … a bit rough to use with VR, especially as there’s no (easy) way to disable jitter which you don’t really want to have on for VR TAA.
Yep. That’s the explicit goal of this specific implementation. Everything gets and outline. You cannot avoid that. If you have UI elements that are rendering in the opaque queue, then they’re going to get outlines too. Again, you cannot avoid this, both because of how this particular effect is written and because of how Unity handles post processing.
If you want outlines that work well with MSAA, you cannot use a post processing effect like this that makes use of depth and normals because the camera depth and normals textures, and those are do not (and cannot) use MSAA. That’s not something Unity supports doing at all.
If you want just an outline, you might want to look into using old school inverted hull outlines. Like this:
https://github.com/chrisnolet/QuickOutline
For Falcon Age I used a post processing based outline that works a bit like this asset:
https://github.com/cakeslice/Outline-Effect
For the Quest version of Falcon Age any kind of post processing was way, way too slow. The QuickOutline above probably would have worked, but I instead used a technique that renders each object 4 times slightly offset in screen space to produce an outline. This was more expensive than using an inverted hull, but still not as expensive as I feared it could be, and let it work on any mesh without any kind of additional setup step like the QuickOutline does. But I don’t have an example shader / project of that to share.
These won’t do the interior edge lines though, only the exterior outline. The only way to do that nicely for MSAA is to draw bespoke “edge” lines as geometry, or bake it into custom per mesh textures.