Unlit outline shader material on a Lit player?

I have a player with an outline shader material that is UnLit. I would like the player character to be LIT to be affected by lightning but his outline to be UnLit.

Currently the whole player becomes UnLit when i attach the outline shader material onto him. This is what i have so far with the player on the left who is UnLit and another player on the right who is Lit.

Im wondering is there even a way to have the “Default sprites Lit” material on a sprite while having an outline created from Shader graph at the same time?

Thankx!
My Shader:

Can you share/show the shader?

PS: you have tagged the post wrong, it’s tagged Community-Services so it’s in the wrong category!

1 Like

Updated with my shader (unlit one)
Where does it need to be? I didnt quite understand all the categories.

I guess you could tag it URP or Shader-Graph, or 2D (or even better, all of them)

I think thats broken, there is always “No matches found” for all of these searches

I see them when I create a topic (and also when I edit one)

Thanks i had the wrong main category :slight_smile:

1 Like

In any case, sorry I didn’t want to derail the discussion.
I’m not sure what you want to do is doable with one shader. I tried to use Emission on a Lit shader so you could draw the outline at maximum emission power in order not to be lit, but the graph seems to ignore the Emission block… :frowning:

I think you might have to use another shader only for the outline. Can you maybe use a Render Feature? (you’re in URP, right?)
So you draw your characters like normal, then add a Render Feature to the URP Renderer asset, either Render Objects or Full-screen Pass, to draw the outline.

Some docs: Pre-built effects (Renderer Features) | Universal RP | 14.0.11

This would require to put all the outlined characters on a Layer though.

First time trying shaders today so im not completely following but i tried applying unlit to the character and then lit to a copy of the character and they are on separate layers. It sounds kinda tedious though.

I will check that documentation and see if there is some kind of mask i can use! :slight_smile: Thanks !!