Custom stencil for individual objects.

Hi, I have been trying this for days but couldnt solve this.

Right now i was able to get the outlines but based on combined stencils instead of individual objects. Example : See the smallish plant with the yellow and red outline.

Qns :

  1. How do i isolate individual objects as stencil outlines?
  2. What is " All bits (255), ignore depth" in “Set Custom Depth Stencil Write Mask” and how do i use it?

Many thanks in advance!

It’s hard to say without seeing your code, but I believe your question is wrong in itself. You already have different outline colors on your picture, which leads me to believe that you’ve already “isolated” the stencils, as you say it. The problem there is that you’re not doing some kind of depth check between different objects. I’m not the best place to ask when it comes to materials, and especially postprocessing, but l believe your best bet is to look how other outline materials do it. Google is your friend.

Any solution for this? I have found a convoluted solution and would like to hear a simpler ones before resorting to it.