Parallax aligned material (BumpOffset without distortion)

I am trying to make an in-game HUD device where certain elements (reticle, artificial horizon) must be aligned with objects or the world regardless of the camera position (provided the camera is within the limits of HUD view angles) at relevant ranges. The artificial horizon would be at infinity and the reticle at roughly 100-200m.

The idea is to create a material where the UV is offset to align the textures using BumpOffset to give the material the necessary depth and have the texture aligned as required.

Problems with this approach are:

  1. For large offset values there is a noticeable distortion due to the Camera Vector node which returns a gradient over the whole material.
  2. Any shapes other than perfectly flat will break the alignment due to the use of Tangent space for the Camera vector.

To solve this I made a simple calculation that returns a single value for Camera Vector without using Tangent space.

This is my solution, and for the most part it seems to work correctly, but there are few problems:

  1. Doesnt work with curved meshes, also even on flat meshes there is some distortion toward the edges of a mesh.
  2. Requires a lot more work to correctly set up, position offset to align with mesh if the part on which the material is applied is not the center of a model, and also axis rotation if the material is not aligned with the forward axis.

At this point, I am thinking I need to calculate the UV offset in screen space and then apply it to mesh. Are there any existing solutions to this? Am I overlooking a simpler solution? Any help would be greatly appreciated. Thanks!

I found a way to align the UV to the camera, and this actually solves the alignment issues.

However, this rotates the UV to face the camera. This, unfortunately, causes other issues, I am trying to rotate UV to stay aligned to the object surface and rotate with the object to maintain relative orientation to the mesh.

Aligning UV to be parallel to the mesh surface and rotated correctly should be enough to achieve what I need. Unfortunately, I’m unsure how to rotate the UV map to make it parallel to the mesh surface and up vector. Any help would be appreciated!