Your HLSL yields the transformation: y -> y*(1+(intensity*abs(x))), where x and y are measured from the center of the image. This can make quite a sharp transition across x = 0. You can relieve that with some kind of mapping of x.
Here, the transform is elaborated to y -> y*(stretch+(intensity*(abs(x)^shape))). shape can smooth out the transition, adding an adjustable power of x to y.

If you want the HLSL function as posted, set shape and stretch to 1.


(Image not packed in the .blend).
You may want to investigate the compositor's Lens Distortion node, depending on where you need this effect in your workflow.