Can a shader be made to ignore a layer/s?

I want to make one of my shaders on the camera to ignore certain objects in the game.

Is this possible? I can’t find good answers.

I found this answer/question. It may help you.