2d Color swap shader

Hello everyone,
I’m wondering what’s the best way get effect from this:


to this:

I’ve already try to get that effect by post processing and shaders (i’m totally newbie in writing shaders) but results wasn’t good enough. Map is generated dynamically from sprite palette.

I know I could create another sprites to get that effect but is it really necessary? :slight_smile:

Great solution is by ‘Makin stuff looks good in Unity’ video :

but it only works for four colours.
How you guys would recreate that effect?
Thanks in advance for responses.

I agree, a post proc Image effect on the camera would probably the simplest approach for that. The effect Looks like a simple Color conversion (using only the green channel, and creating a Grey value from that with a cap at 0.25).

Cheers,
-ch