Short Easy Camera Question

I was reading up in the docs about cameras and one of the options for ‘clear flags’ is ‘depth only’. It says:

I get most of it. One cam (the gun cam) is set to depth=1 and the environment cam is set to depth=0.
I also get that you have to set the gun cam to ‘depth only’.

But here’s what I don’t get: why will the gun cam know to only render the gun? Does the gun itself need to be set to a certain ‘depth group’?

Call me a newbie (I wouldn’t blame you), but if you have any info on the matter I would be happy to know!
Cheers!
-TT

Place the gun on a specific layer (say, “Gun”). Now, on the gun camera, set the “culling mask” to that layer (so “Gun” in the example).

Jeff