I want to use this shader for my character to make an outline around the character.
I created a separate scene for the character and added a regular material to its MeshInstance3D, and then added the shader material in the next pass:
CharacterBody3D
|- CollisionShape3D
|- MeshInstance3D (Character model)
|- NavigationAgent3D
The problem is that all the objects in the same scene as the character are covered by this contour even though they do not have this shader material. For some reason, the shader also disappears in the peripheral areas of the camera in the game and in the editor (second screenshot)