UPDATE (2 July, 2023) - Added a new DX9 version. Also updated and fixed the existing version.
Here’s the Github link to the shader. (Please report any issues you find in these forums.)
IMPORTANT -
Always make sure Resolution_X and Resolution_Y are the same size as Resolution X and Resolution Y respectively.
Resolution_X and Resolution_Y can usually be found at the bottom in Preprocessor Definitions.
EXAMPLE -