Gun still clips through the wall despite layer masks being applied

Hi, I’ve been working on a first person shooter for a while, and have been having an issue where my gun clips through the wall. After searching through the internet, I found a solution which uses layers in order to render the gun over everything else, but now I can’t even see the gun at all. It’s been extremely frustrating and I would like some help from you guys. Here are some photos of the settings: help - Album on Imgur

It seems as though my CameraPixelator class was not rendering my second layer.