That bitrate shader is pretty cool. I didn't think doing that kind of post processing was that simple.
Do you do the input color->base palette distance check because of how your team works with pixels or because that's just how you support palettes?
Edit:
If it's the latter, why not just convert the original image to a indexing image using a base palette, or generating a base palette. Then, you just send in the indexing image to the shader + the desired (alternate) palette.
paletteUVCoord = sample(indexTexture,UVCoord) / 255
outputColor = sample(altPaletteTexture,paletteUVCoord)
Do you do the input color->base palette distance check because of how your team works with pixels or because that's just how you support palettes?
Edit:
If it's the latter, why not just convert the original image to a indexing image using a base palette, or generating a base palette. Then, you just send in the indexing image to the shader + the desired (alternate) palette.
paletteUVCoord = sample(indexTexture,UVCoord) / 255
outputColor = sample(altPaletteTexture,paletteUVCoord)