How to adjust texture coordinates with a distortion texture?
No need for OSL, just use a Converter > Vector Math node.



The above node setup uses the image texture on the left to offset the UV (or any other) texture coordinates by adding the distortion map pixel values to the mapping vectors (RGB is automatically converted to XYZ).



If you want a little more control over the distortion strength  and directionn you can add a Separate RGB and Combine XYZ node and use some math nodes in-between.



With the above node setup you can adjust the strength for each direction independantly, if you want the same strength in all directions and don't want to have to play with 3 different values you can plug an Input > Value node into all 3 math nodes.