Refracta

what the world looks like before your glasses

+0.00 sph
⟨⟩
CORRECTED UNCORRECTED

The optics in 60 seconds

A refractive error focuses light in front of or behind the retina. The blur disk of a defocused point subtends β ≈ p · ΔD radians, where p is the pupil diameter and ΔD the defocus in diopters. Pixels: r = ½ p ΔD / radPerPixel.

Astigmatism gives the eye two focal powers on perpendicular meridians (SPH and SPH+CYL, rotated by AXIS). A point source maps to an oriented ellipse, a cross-section of Sturm's conoid. That directional smear is why night lights streak, and why an isotropic Gaussian cannot fake it.

Depth: each pixel's defocus is ΔD = Vobject + SPH − A with V = 1/distance. The simulated eye accommodates (A, limited by age via the ADD) to put the circle of least confusion on the retina for your chosen focus target, so the focal plane is sharp and everything else blurs by its true dioptric distance.

Bright pixels are expanded back to plausible radiance before blurring (inverse tonemap), which is what keeps headlight streaks vivid instead of washing out grey. The optional chromatic term models the eye's ~1.2 D of longitudinal chromatic aberration.

The same formulas exist three times: NumPy/OpenCV reference, these uniforms, and the GLSL kernel. The validation page proves they agree.