Skip to content

Class · inherits PostEffect

DepthOfFieldEffect

Official docs ↗

Simulates a camera lens by blurring parts of a scene not in focus.

About DepthOfFieldEffect

The DepthOfFieldEffect simulates a camera lens by blurring parts of a scene not in focus. Distant objects can be blurred or this effect can be used to focus on specific parts of a scene, like an item in an in-game shop.

Like other post-processing effects, DepthOfFieldEffect will only work while Enabled and when parented to Lighting or Workspace.CurrentCamera. Also, it may render differently on low-end devices or depending on your Studio settings (see the Quality Level settings in Rendering → Performance).

For more details on this effect and others, see Post-Processing Effects.

Properties 4

  • FarIntensity: floatIntensity of the far field blur.

    Intensity of the far field blur, moving out in distance from the FocusDistance point plus InFocusRadius value.

  • FocusDistance: floatDistance away from the camera where objects are in focus.

    Controls the distance away from the camera (in studs) where objects are in focus.

  • InFocusRadius: floatControls the distance away from the FocusDistance where no blur is applied.

    Controls the distance away from the FocusDistance (on both sides) where no blur is applied. Measured in studs.

  • NearIntensity: floatIntensity of the near field blur.

    Intensity of the near field blur, between the camera and the FocusDistance point minus InFocusRadius value.

DepthOfFieldEffect also has every member of PostEffect. Deprecated and Roblox-only members are hidden.

Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.