This fisheye parameters simulate a hemispherical (fisheye) lens capable of rendering a 180-degree field of view with characteristic hemispherical distortion typical of real-world fisheye lenses. This shader does not attempt to implement some of the less desirable (and less predictable) traits of fisheye lenses, such as chromatic and spherical aberrations; in that sense, this is an "ideal" fisheye lens.
This shader is compatible with the pass camera's lens center offset controls, so it should be possible to achieve Omnimax style fisheye images (where the lens center is near the bottom of the screen).
Furthermore, the horizontal/vertical proportions of the lens hemisphere are not coupled to the camera aspect ratio (with the legacy fisheye lens shader, changing the camera aspect ratio resulted in a corresponding change in the shape of the lens hemisphere). Rather, this shader's scale parameters permit independent scaling of the fisheye lens' X and Y axes.
This shader can be applied directly to the camera in the lens shader stack. See Applying Lens Shaders to Cameras [Cameras and Motion Blur].
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License