A very simple shader that lets you achieve the effect of palette cycling. Using this shader is extremely cheap for performance.
You need 2 images: base image, which is grayscale, and a palette, which is a single-row texture. The shader will map the colors from palettte to their grayscale equivalents (specifically, it uses red channel as value) and cycle the colors from the palette. With a proper distribution of colors, you can achieve effects like waterfalls, conveyor belts etc. Here's example:
To achieve the best effect, the textures need to meet these criteria:
- the node with shader should have
texture_filterset to Nearest - the color count in the original texture and the palette should be the same
- shades of gray in the original texture need to have equal increments in their value (e.g.
0.333,0.666,1.0, but not0.2,0.5,1.0)
If you want more flexibility at the cost of some performance, check out my palette swap shader.
You can find all my addons on my profile page.
