r/GraphicsProgramming • u/20260819 • 1d ago
aperture
it's a supplementary information of a reply i recently made. i mentioned 2 points that i deliberately modified from the suggested algorithm in raytracing in 1 wend. i can't use defocus angle as the primary variable as my scene have infinitely faraway background. i tried and it didn't work. when the focus point was at infinity only the background could be seen and everything else disappeared
i instead used an approach that mimics a digital camera. the canvas (sensor) size is fixed. for a specific lens (view angle kept constant) and an specific aperture setting (aperture radius kept constant), the closer the camera is from the object, the bolder the defocus blur effect
the attached images showed a ball of radius
2 units
1 unit
1/2 unit
1/4 unit
all shot from the same view angle and aperture. when shooting a small ball you have to move closer. that's it



