Got around to having another go at this finally. I've only tested on my laptop but it should work with all resolutions. I also added a variable to control screen curvature.
You can apply this to layouts, layers or sprite objects if you want to. Just be sure to set width and height to whatever size your object is. For instance, if you're applying it to a layout you should set width and height to the game resolution. If you put it on a sprite then set it to the sprite's size.
It works best with pixel rounding turned on and fullscreen scaling on high quality.