Lens effect is simulated by a pixel displacement (geometric distortion) usually modeled by the pinhole camera model plus the Brown-Conrady 5-parameter lens distortion. A darkening at the corners is also seen in fish-eye lenses (aka. vignetting).
for more information, see the simulator code at:
https://github.com/mah92/camsim
It is written with c++/glsl