Whoah, slow down. Rim shader looks like crap on cuboid models.
Not that it isn't worth figuring out how to do, just that it isn't going to do what you think it does.
The sphere and the cube have the same shader applied to them, the sphere looks pretty awesome because it has a lot of faces and gently changing surface normals. The cube looks awful because all of its faces are perpendicular to each other, so the angle change is much larger.
I think what you need though is to subscribe to a late-stage rendering event and then render the item again with the outline/glow effect only.