Custom Cardboard Viewer Implementation:Barrel Distortion

In the past I’ve used the webVR Polyfill as a default for my stereoscopic cardboard views. The main reason was that the webXR implementation seems to trigger the installation of some XR-Bridge App on some Android Devices.

But I’ve recently stumbled over this nice custom cardboard-viewer:
Here especially the nice customization features (screen size and lens details) are really nice.
So I thought a similar tool for playcanvas would be great.
Here is how far I’ve come so far:

What is now missing is the barrel distortion, which seems to be done using vertex distort according to this answere here:

Could someone point me in the right direction how this could be implemented for pc?
As I would need such a viewer for upcoming projects I would also consider sponsoring such an implementation if some pro has time to take look at it (I will also create a post within the jobs category), but wanted to ask here beforehand.

As always thanks for any heads up!