Adding Rim Light to Unity5 Standard Shader

Ok, so I kinda understand the basics of surface shader writing, but getting lost when it comes to the vertex/frag stuff. I’m trying to figure out how to add the relatively simple rim light Emission effect to the Standard Shader to create the typical “glow on mouseover” effect. As well as apply it to the Albedo/Diffuse for a sort of outline effect (different from Image Effects Outline).

So started digging thru the Standard Shader code, but can’t for the life of me figure out how to get this to work. At first I thought it would go in the StandardInput include, but can’t seem to pull the view direction vector - viewDir doesn’t seem to work and no other references to it I can find in there. So ended up looking in the StandardCore include, but having problems finding references to the Normal Map there.

Can anybody toss me a clue to point me in the right direction?

Found a possible solution that appears to work.

Most of the work seems to happen in the fragForwardBase function in the StandardCore include.
-s.eyeVec (negative of the vector) seems to be the viewDir
s.normalWorld is the reference to the Normal Map

Hope that is right and helps anyone else poking around for an answer.