Thank you for this shader, it was exactly what I was looking for.
I seem to have really bad performance issues when using the fullscreen shader with the ColorRect method, especially when using "canvas_items" stretch mode, but also on "viewport".
I'm talking about having the fps of the game drop from 5000+ to 30.
Is there any way that this can be fixed? Can post more information if needed.
EDIT: Managed to improve the performance by using 1-pixel sized palettes, however, there is certainly a performance toll but it's more tolerable.