RSX Code Reference
    Preparing search index...
    • rsx
    • DepthOfFieldSettings

    Class DepthOfFieldSettings

    Settings that control the depth-of-field effect.

    Index
    • get adaptiveColorThreshold(): number

      Determines the maximum color difference between surrounding pixels allowed (as a sum of all channels) before higher fidelity sampling is triggered. Increasing this value can improve performance as less higher fidelity samples will be required, but may decrease quality of the effect. Only relevant when using Bokeh depth of field.

      Returns number

    • set adaptiveColorThreshold(value: number): void

      Parameters

      • value: number

      Returns void

    • get adaptiveRadiusThreshold(): number

      Determines the minimum circle of confusion size before higher fidelity sampling is triggered. Small values trigger high fidelity sampling because they can otherwise produce aliasing, and they are small enough so they don't cost much. Increasing this value can improve performance as less higher fidelity samples will be required, but may decrease quality of the effect. Only relevant when using Bokeh depth of field.

      Returns number

    • set adaptiveRadiusThreshold(value: number): void

      Parameters

      • value: number

      Returns void

    • get bokehShape(): Texture

      Texture to use for the bokeh shape. Only relevant when using Bokeh depth of field.

      Returns Texture

    • set bokehShape(value: Texture): void

      Texture to use for the bokeh shape. Only relevant when using Bokeh depth of field.

      Parameters

      Returns void

    • get farBlurAmount(): number

      Determines the amount of blur to apply to fully unfocused objects that are farther away from camera than the in-focus zone. Set to zero to disable far-field blur. Only relevant for Gaussian depth of field.

      Returns number

    • set farBlurAmount(value: number): void

      Parameters

      • value: number

      Returns void

    • get farTransitionRange(): number

      Determines the size of the range within which objects transition from focused to fully unfocused, at the far plane. Only relevant for Gaussian and Bokeh depth of field. In world units (meters).

      Returns number

    • set farTransitionRange(value: number): void

      Parameters

      • value: number

      Returns void

    • get focalRange(): number

      Range within which the objects remain fully in focus. This range is applied relative to the focal distance. This parameter should usually be non-zero when using the Gaussian depth of field effect. When using other types of depth-of-field you can set this to zero for a more physically-based effect, or keep it non-zero for more artistic control. In world units (meters).

      Returns number

    • set focalRange(value: number): void

      Parameters

      • value: number

      Returns void

    • get isEnabled(): boolean

      Enables or disables the depth of field effect.

      Returns boolean

    • set isEnabled(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get isUsingBokehOcclusion(): boolean

      Set to true if Bokeh flare should use soft depth testing to ensure they don't render on top of foreground geometry. This can help reduce background bleeding into the foreground, which can be especially noticeable if the background is much brighter than the foreground. Use OcclusionDepthRange to tweak the effect.

      Returns boolean

    • set isUsingBokehOcclusion(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get maxBokehSize(): number

      Determines the maximum size of the blur kernel, in percent of view size. Larger values cost more performance. Only relevant when using Bokeh depth of field.

      Returns number

    • set maxBokehSize(value: number): void

      Parameters

      • value: number

      Returns void

    • get nearBlurAmount(): number

      Determines the amount of blur to apply to fully unfocused objects that are closer to camera than the in-focus zone. Set to zero to disable near-field blur. Only relevant for Gaussian depth of field.

      Returns number

    • set nearBlurAmount(value: number): void

      Parameters

      • value: number

      Returns void

    • get nearTransitionRange(): number

      Determines the size of the range within which objects transition from focused to fully unfocused, at the near plane. Only relevant for Gaussian and Bokeh depth of field. In world units (meters).

      Returns number

    • set nearTransitionRange(value: number): void

      Parameters

      • value: number

      Returns void

    • get occlusionDepthRange(): number

      Range in world units over which range to fade out Bokeh flare influence. Influence of the flare will be faded out as the depth difference between the flare's origin pixel and the destination pixel grows larger. Only relevant if BokehOcclusion is turned on.

      Returns number

    • set occlusionDepthRange(value: number): void

      Parameters

      • value: number

      Returns void

    • Allows modifying this object multiple times in a row in a scope, without marking the object dirty immediately. Dirty flags are accumulated and the object is marked dirty at the end.

      Parameters

      • action: () => void

        The scope where the object is modified.

      Returns void