Equirectangular on 3dViewport

Hi, i need to see in realtime the viewport camera using equirectangular distortion.
Would this be possible inside Blender using maybe a script. Any help would be great, thanks!