Selective outlines shader

Godot Version

4.2

Question

Hello, i’m new to godot. Im experimenting with shaders and im trying to achieve a 3d pixel art look. I followed this tutorial here: https://www.youtube.com/watch?v=WBoApONC7bM

I like the outlines shader, but i would like to be able to select wich objects are affected or not, for exemple i don’t want the grass or tree leaves to be affected.

I’m having trouble finding information on how to do that, the only things I found are for outdated godot versions.