3D Camera Effect? (like in Five Nights at Freddy's)

In Five Nights at Freddy’s the game has some sort of “3D camera vision” like so:

http://webmup.com/riR0o/vid.webm

I think it’s called the fish eye lens effect? It’s basically just a long flat image stretched/curved(?) to look like the player was looking around I guess. The game has surveillance cameras too, and they have the same effect when moving left and right.

I was wondering how I could achieve the same effect? Preferably with Libgdx or using GL functions :slight_smile:

looks like post-processing distortion. imagine sitting inside a cylinder projecting the screen-rendering onto the inner side.

with opengl you can achieve this by rendering everything into a offscreen texture (FBO) and draw a fullscreen quad after that with the texture applied. using a shader to distort the texture coordinates.

http://www.geeks3d.com/20140213/glsl-shader-library-fish-eye-and-dome-and-barrel-distortion-post-processing-filters/
http://paulbourke.net/miscellaneous/lenscorrection/