The stencil buffer should be used during the geometry pass of the MeshRenderer so that the lighting pass can immediately discard unwritten fragments