Is it possible to have lens distortion in OpenGL viewport?

   1181   1   0
User Avatar
Member
448 posts
Joined: Aug. 2019
Offline
As title. For example fisheye lens. I know one can use Physical Lens in Karma, then render in the viewport, but is it possible to have lens distortion in real-time?
User Avatar
Member
7836 posts
Joined: Sept. 2011
Offline
No, because opengl is a rasterized renderer, it doesn't use raytracing to render the scene. Game engines fake it with some phony warping of the frame buffer but this isn't really a lens shader. lens shaders can send rays in any direction from any origin, which isn't possible to replicate with simple warping.

The other issue is that lens shaders are expressed in VEX which OpenGL does not understand.
  • Quick Links