Support Forum       G3D Web Page     
Public Member Functions | List of all members
glsl::DepthOfField_glsl Class Reference

Shader program. More...

Public Member Functions

float circleOfConfusionRadiusPixels (float z, float focusPlaneZ, float screenFocusZ, float nearBlurryPlaneZ, float nearSharpPlaneZ, float farBlurryPlaneZ, float farSharpPlaneZ, float nearScale, float farScale, float scale, const bool chromaBlur, const int model)
 All the z values are negative numbers (in front of the camera). More...
 

Detailed Description

Shader program.

Member Function Documentation

◆ circleOfConfusionRadiusPixels()

float glsl::DepthOfField_glsl::circleOfConfusionRadiusPixels ( float  z,
float  focusPlaneZ,
float  screenFocusZ,
float  nearBlurryPlaneZ,
float  nearSharpPlaneZ,
float  farBlurryPlaneZ,
float  farSharpPlaneZ,
float  nearScale,
float  farScale,
float  scale,
const bool  chromaBlur,
const int  model 
)
inline

All the z values are negative numbers (in front of the camera).

Return value is a signed number where negative values mean that the point spread function is upside down and far from the camera and positive values are close.

See also
DepthOfField::computeCoC

If model == PHYSICAL the scale argument is computed as follows:

const float scale = (screenSize * 0.5f / tan(camera->fieldOfViewAngle() * 0.5f)) * camera->depthOfFieldSettings().lensRadius() /
(camera->depthOfFieldSettings().focusPlaneZ());

documentation generated on Wed Nov 24 2021 08:02:03 using doxygen 1.8.15