Pre-distortion
Pre-distortion, also known as distortion correction, is a process that is done to an image displayed in a lens-based VR headset or a reflector-based AR headset that turns each eye rendered from a perfect rectangle to a rounded, distorted one before it is displayed through the lens.
It can be done with a pixel shader or by rendering a scene to a texture that is then rendered onto a curved virtual surface. In applications displayed on VR headsets, barrel distortion is applied to the image, because the lens system introduces pincushion distortion.
A distortion shader is a parallelized GPU program that performs a geometric operation on an image before it is sent to a display, so that when displayed, it passes through an optical system that performs an inverse distortion of the shader, so that the image arrives at the user's eye with perfect geometry. It is also known as an undistortion shader.
Undistortion shaders are used by many VR headsets, and the Project North Star.
Distortion correction was the subject of the Zenimax-Oculus lawsuit.[1]
In Project North Star[edit]
In Project Esky for Project North Star, images are rendered using a secondary OpenGL instance created at runtime within a running Unity Engine instance. Two render textures (one for each virtual eye camera) are shared with the OpenGL instance, rendering them to the Project North Star displays with a polynomial-based correction shader.[2]