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:

enter image description here

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.

  • \$\begingroup\$ Do you currently have a shader that renders a greyscale image using a swappable palette texture that we can use as a starting point? \$\endgroup\$
    – DMGregory
    Nov 6 '18 at 0:14
  • 1
    \$\begingroup\$ I have never implemented it, but I am familiar with the technique. I guess the idea would be to design all the scenes using gray scale with n shades of gray, then have nx1 sized palette textures to sample and use for coloring and swapping? \$\endgroup\$
    – DyingIsFun
    Nov 6 '18 at 1:02
  • \$\begingroup\$ did you see this tutorial and this post \$\endgroup\$ Nov 6 '18 at 3:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.