effectComposer + layers does not work

https://discourse.threejs.org/t/solved-effectcomposer-layers/3158

I saw the problem raised by others before, the post processing operation of the specified object was performed by effectComposer and layers. I tried it myself, and it was effective. Now I want to apply this method in my project, but the result is not in line with expectations

Now the situation is that I set the camera layer to 1 and call composer.render() to get the post-processing effect, then I call clearDepth and set the camera layer to 0, but all objects with layers at 0 are not rendered

I would like to give more codes and descriptions so that everyone can understand my problem more clearly, but I am not familiar with this part of content, and there are some processing based on the framework of three.js may interfere with the normal post-processing process, I am not sure which part of the problem, I hope someone can give some advice. How should I troubleshoot this problem or is there a possible cause

I think it has to do with the binding renderTarget. I tried to set the renderTarget to null before calling renderer. Then I found that the result was successfully rendering all of objects. However, objects with layers of 1 that need to be post-processed disappear