Panini Projection

1.00
100
1.00
0.00, 0.00, 0.00

About Panini Projection

Panini projection is a cylindrical-perspective family used for wide-FOV images. Compared with rectilinear projection, it reduces edge stretching while keeping vertical lines visually stable, which is useful for architecture and first-person wide-angle views.

This demo renders a standard perspective scene to a texture, then applies Panini in a fullscreen post shader using inverse mapping. The D slider controls projection strength.

Historical Note

Giovanni Paolo Pannini (1691-1765) was an Italian painter known for architectural vedute and large interior scenes with very wide perspective space. Modern Panini projection techniques are a computational rediscovery/formalization of related wide-view perspective practices associated with that tradition.

Shader Mapping (MathML)

The fragment shader applies an inverse Panini mapping from output normalized coordinates (u,v) to source perspective coordinates:

k=d+1 R= k2 + u2 α=atan2(u,k) θ=α+ asin ( ud R ) c=cos(θ) tanϕ= v(d+c) k x=tan(θ) y= tanϕ c

Then (x,y) is normalized by tanHalfFovX/tanHalfFovY and sampled from the source render target.

References

Creative Commons Attribution

Loading low_poly_city/scene.gltf...