I have read about the pannini projection, which involves (I think) projecting a scene onto a cyclinder instead of a rectangle.

How can I implement this projection in a vertex shader?

Blinky is using lenses and globes, but I don't think it's what I am looking for. The lua script for the pannini projection is not commented https://github.com/shaunlebron/blinky/blob/master/game/lua-scripts/lenses/panini.lua

As explained on http://tksharpless.net/vedutismo/Pannini/ the projection works (if I understand it well), by projecting geometry on a cylinder, and then unrolling that cylinder on screen.

Diagram illustrating Pannini projection from a floor map

  • \$\begingroup\$ If you did ray tracing, you'd just need to shoot each ray in a direction determined by the cylindrical frustum. \$\endgroup\$ – Exilyth Sep 8 '18 at 23:28

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.