Have parts of a sprite that are not affected by light

For example in the following image the pink part I do not want to be affected by light, but the gray part I do want it to be affected by light

Testing at Unity 2020

Normal behavior is that the entire sprite undergoes light changes, with the “Sprite-Lit-Default” Material.

What I can easily think of is separating the sprites into two parts and selecting the “Sprite-Unlit-Default” material for the part I don’t want to light up. This works well for my static items in the game. But I have some animations it would be very difficult to work this way.

I have thought of an approach that might work.

With a shader define an outline and I know that only that part is affected by light, although it is not exact. At the moment I have my outline with the Shader Graph but what would I have to do to get the result I want.

6128141--667994--cap_104.JPG

Oh I’m getting too complicated and is there a more natural way to do this?

If you handled light on your own in the shader you could just use a greyscale sample and ask if color greater than 0 then apply light.

Which you might also be able to accomplish using Unity’s real time lighting system.