Okay, so as I mentioned, I know nothing of shaders lol, but it looks like we are basically doing the same thing mathematically speaking... but In mine I flip y at the end for the 2 texture coordinates that you then mix together. Also in mine, I apply the fx to a sprite that is the lookup table - that then has to be scaled to fit the screen exactly. Anything you don't want affected has to go above the layer containing the table. I added a few other properties like collums and rows for the table so you can use multiple sizes and a version that has no color mixing at the end for crispy pixels in a retro game , but other than that...
Again, I checked the math and I think it is basically the same (pretty sure) except for what I noted. As I said, I'm bad with shaders so the nuances escape me, but maybe you know?