A material with modified depth?

Would it be possible to get the depth of a material and multiply it, divide it, add to it, etc., thus making it seem further from the camera than it really is? I’m wondering because I want to make a red-dot type of effect for the HUD of my game, so that when the player’s helmet moves the HUD seems more like a projection onto the inside of the visor instead of just a simple image on the screen. The HUD will be a 3D model in front of the player. I’m sure it could easily be done with shaders. All it would really need to be is the Unshaded shader but with modified depth. It’s just that I’m quite inexperienced with GLSL.

Thanks to any advice or pointers in advance!

What are you using for your HUD?

@pspeed If I’m interpreting the question right, you’re asking how I’ll be rendering it? I’m aiming for it to be Nifty with render-to-texture, applied to a model in the 3D space.

Then you don’t even need to worry about GLSL, I think. Just make the mesh like the inside of a helmet or whatever and put the texture on that.

@pspeed I know that already, but I wanted an effect that made it seem more projected onto the visor of the helmet instead of just being slapped in there. If you’ve played the more recent Call of Duty games, or Battlefield as well, you’ll notice that with their red-dot sights and things like that, you don’t see the dot until you aim-down-sight, and when you do ADS the dot doesn’t move exactly with the actual sight, but rather like a realistic dot sight would behave. I was asking if it was possible to get a similar effect through GLSL. I might not have explained it really clearly the first time around.