In this cut scene from Shovel Knight, the individual pixel art tableaux don't merely fade in and out. Rather, they fade in and out as well as undergo various hue changes.
Here's an example:
The changes in color appear to be discrete, and follow some kind of pattern.
I want to achieve a similar effect using a GLSL shader, but I am having trouble discerning exactly what pattern the colors follow. It seems like lighter colors in the palette are progressively swapped for darker colors in the same palette.
Any ideas how to achieve a similar effect?
Would achieving a similar effect require predefining palette swaps as well as creating gray scale masks of the areas that eventually get blacked out? I would prefer it if there was an easier solution, for example, identifying some general pattern in the color changes that could be used for any palette.