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

Public Member Functions

 DepthOfFieldSettings ()
 
 DepthOfFieldSettings (const Any &)
 
float circleOfConfusionRadiusPixels (const float z, const float edgeToEdgeFieldOfView, const float screenPixelSize) const
 
More...
 
bool diskFramebuffer () const
 
bool enabled () const
 
void extendGBufferSpecification (GBuffer::Specification &spec) const
 
Ensures the GBuffer specification has all the fields needed to render this effect More...
 
float farBlurRadiusFraction () const
 
float farBlurryPlaneZ () const
 
float farSharpPlaneZ () const
 
float focusPlaneZ () const
 
float lensRadius () const
 
DepthOfFieldModel model () const
 
DepthOfFieldModel::Value modelValue () const
 
float nearBlurRadiusFraction () const
 
float nearBlurryPlaneZ () const
 
float nearSharpPlaneZ () const
 
int reducedResolutionFactor () const
 
void setDiskFramebuffer (bool b)
 
void setEnabled (bool e)
 
void setFarBlurRadiusFraction (float r)
 Maximum defocus blur in the near field under the ARTIST depth of field model, as a fraction of the screen size along the axis indicated by the field of view. More...
 
void setFarBlurryPlaneZ (float z)
 
void setFarSharpPlaneZ (float z)
 
void setFocusPlaneZ (float z)
 Plane that is in focus under a lens camera (PHYSICAL depth of field model). More...
 
void setLensRadius (float r)
 Radius of the lens in meters under the PHYSICAL depth of field model. More...
 
void setModel (DepthOfFieldModel m)
 
void setModel (DepthOfFieldModel::Value m)
 
void setNearBlurRadiusFraction (float r)
 Maximum defocus blur in the near field under the ARTIST depth of field model, as a fraction of the screen size along the axis indicated by the field of view. More...
 
void setNearBlurryPlaneZ (float z)
 Set the plane at which the maximum blur radius is reached in the near field under the ARTIST depth of field model. More...
 
void setNearSharpPlaneZ (float z)
 
void setReducedResolutionFactor (int f)
 Divide the image size by this in both directions to speed processing for large blurs at the cost of some flickering and boxy artifacts for small blurs. More...
 
Any toAny () const
 

Constructor & Destructor Documentation

◆ DepthOfFieldSettings() [1/2]

G3D::DepthOfFieldSettings::DepthOfFieldSettings ( )

◆ DepthOfFieldSettings() [2/2]

G3D::DepthOfFieldSettings::DepthOfFieldSettings ( const Any )

Member Function Documentation

◆ circleOfConfusionRadiusPixels()

float G3D::DepthOfFieldSettings::circleOfConfusionRadiusPixels ( const float  z,
const float  edgeToEdgeFieldOfView,
const float  screenPixelSize 
) const


Parameters
zIn camera space; should be NEGATIVE
edgeToEdgeFieldOfViewAngular field of view along the X or Y axis, corresponding to the screenPixelSize axis
screenPixelSizeWidth or height of the screen, in pixels (choose one based on the field of view direction)
Returns
Signed circle of confusion radius in pixels

If negative, then z is closer to the camera than the focus depth. If positive, then z is farther.

See also
Camera::circleOfConfusionRadiusPixels, Camera::maxCircleOfConfusionRadiusPixels

◆ diskFramebuffer()

bool G3D::DepthOfFieldSettings::diskFramebuffer ( ) const
inline

◆ enabled()

bool G3D::DepthOfFieldSettings::enabled ( ) const
inline

◆ extendGBufferSpecification()

void G3D::DepthOfFieldSettings::extendGBufferSpecification ( GBuffer::Specification spec) const


Ensures the GBuffer specification has all the fields needed to render this effect

See also
GApp::extendGBufferSpecification

◆ farBlurRadiusFraction()

float G3D::DepthOfFieldSettings::farBlurRadiusFraction ( ) const
inline

◆ farBlurryPlaneZ()

float G3D::DepthOfFieldSettings::farBlurryPlaneZ ( ) const
inline

◆ farSharpPlaneZ()

float G3D::DepthOfFieldSettings::farSharpPlaneZ ( ) const
inline

◆ focusPlaneZ()

float G3D::DepthOfFieldSettings::focusPlaneZ ( ) const
inline

◆ lensRadius()

float G3D::DepthOfFieldSettings::lensRadius ( ) const
inline

◆ model()

DepthOfFieldModel G3D::DepthOfFieldSettings::model ( ) const
inline

◆ modelValue()

DepthOfFieldModel::Value G3D::DepthOfFieldSettings::modelValue ( ) const
inline

◆ nearBlurRadiusFraction()

float G3D::DepthOfFieldSettings::nearBlurRadiusFraction ( ) const
inline

◆ nearBlurryPlaneZ()

float G3D::DepthOfFieldSettings::nearBlurryPlaneZ ( ) const
inline

◆ nearSharpPlaneZ()

float G3D::DepthOfFieldSettings::nearSharpPlaneZ ( ) const
inline

◆ reducedResolutionFactor()

int G3D::DepthOfFieldSettings::reducedResolutionFactor ( ) const
inline

◆ setDiskFramebuffer()

void G3D::DepthOfFieldSettings::setDiskFramebuffer ( bool  b)
inline

◆ setEnabled()

void G3D::DepthOfFieldSettings::setEnabled ( bool  e)
inline

◆ setFarBlurRadiusFraction()

void G3D::DepthOfFieldSettings::setFarBlurRadiusFraction ( float  r)
inline

Maximum defocus blur in the near field under the ARTIST depth of field model, as a fraction of the screen size along the axis indicated by the field of view.

◆ setFarBlurryPlaneZ()

void G3D::DepthOfFieldSettings::setFarBlurryPlaneZ ( float  z)
inline

◆ setFarSharpPlaneZ()

void G3D::DepthOfFieldSettings::setFarSharpPlaneZ ( float  z)
inline

◆ setFocusPlaneZ()

void G3D::DepthOfFieldSettings::setFocusPlaneZ ( float  z)
inline

Plane that is in focus under a lens camera (PHYSICAL depth of field model).

This is a negative number unless you intend to focus behind the camera.

◆ setLensRadius()

void G3D::DepthOfFieldSettings::setLensRadius ( float  r)
inline

Radius of the lens in meters under the PHYSICAL depth of field model.

◆ setModel() [1/2]

void G3D::DepthOfFieldSettings::setModel ( DepthOfFieldModel  m)
inline

◆ setModel() [2/2]

void G3D::DepthOfFieldSettings::setModel ( DepthOfFieldModel::Value  m)
inline

◆ setNearBlurRadiusFraction()

void G3D::DepthOfFieldSettings::setNearBlurRadiusFraction ( float  r)
inline

Maximum defocus blur in the near field under the ARTIST depth of field model, as a fraction of the screen size along the axis indicated by the field of view.

◆ setNearBlurryPlaneZ()

void G3D::DepthOfFieldSettings::setNearBlurryPlaneZ ( float  z)
inline

Set the plane at which the maximum blur radius is reached in the near field under the ARTIST depth of field model.

Adjusts the other plane depths to maintain a legal model.

◆ setNearSharpPlaneZ()

void G3D::DepthOfFieldSettings::setNearSharpPlaneZ ( float  z)
inline

◆ setReducedResolutionFactor()

void G3D::DepthOfFieldSettings::setReducedResolutionFactor ( int  f)
inline

Divide the image size by this in both directions to speed processing for large blurs at the cost of some flickering and boxy artifacts for small blurs.

1,2,3,4 are common values

◆ toAny()

Any G3D::DepthOfFieldSettings::toAny ( ) const

documentation generated on Wed Nov 24 2021 08:01:54 using doxygen 1.8.15