First Person Shooter - Gun that doesn't go through walls

Was wondering what techniques you guys recommend for making a first person shooter gun be infront of everything.

Using a second camera that only renders the gun causes shadows with the gun to not work.
Scaling down the size of the gun makes the shadows work unrealistically.

Perhaps clearing the z buffer when you draw the gun would work…but is there a way to force an object to be the last thing to be rendered?

And in OpenGL you have the ability to add an offset to what gets written to the depth buffer, that would also work but is such a thing possible in a unity shader?

Thanks for reading, just want your thoughts :slight_smile:

Yes, the approach that most games use - disable Z cull when rendering the weapon (and it has to be rendered last, or at least last solid object). You can control render order by changing Queue parameter and a shader, or setting Material.renderQueue from script.