effect-motion
API ReferencethreeNamespacesPostProcessingFunctions

cocRadiusPx

function cocRadiusPx(

Function: cocRadiusPx()

function cocRadiusPx(
   d,
   focusDistance,
   aperture,
   pxPerUnit): number;

Defined in: packages/three/src/DepthAwareDof.ts:193

Physical thin-lens CoC radius (px) at view distance d = −viewZ: a lens of radius aperture focused at focusDistance images the point as a disc of world radius aperture · |d − focus| / d on the focus plane, projected by pxPerUnit (pxPerUnitAtFocus). Near blur grows without bound as d → 0; far blur saturates at aperture · pxPerUnit.

Parameters

ParameterType
dnumber
focusDistancenumber
aperturenumber
pxPerUnitnumber

Returns

number

On this page