Fish-eye rendering et al

So, I’ve taken some time off from work for the vinter holidays here in Denmark. These periods normally results in two things: 1) next to no computer interaction and 2) heaps of new ideas spring to mind.
I’ve been thinking of doing fish-eye and polar rendering for a while. And just the other day the most simple and straight forward technique came to mind.
Back in the old 2D-days I did a massive amount of tunnel and grid based effects. Imagine this: Render a 3D-scene to a texture and put use it as texture input for either the tunnel or the grid.

Doing polar rendering means that the world is rendered spherical from the center of the screen and not top-down. In a 2D-tunnel this equals to remove the depth/perspective division.
Rendering fish-eye effects can be rendered using grid effects where the grid warps the top-down rendered image to be at max zoom in the center and decrease by the distance to the center.
Making the output look good is an exercise to the reader: there are aleast two caveats regarding POV and seamless joints :-)
You may find fragment shader sources for 2D-tunnels and grid-renders at www.iquilezles.org/apps/shadertoy
Once I am happy with my implementation I’ll drop some code for you guys to devour. Happy hacking!
