A constructor defined in BBMOD_DepthOfFieldEffect.gml
Extends BBMOD_PostProcessEffect
new BBMOD_DepthOfFieldEffect([_focusStart[, _focusEnd[, _autoFocus[, _autoFocusRange[, _autoFocusPoint[, _autoFocusFactor[, _blurRangeNear[, _blurRangeFar[, _blurScaleNear[, _blurScaleFar[, _bokehShape[, _sampleCount]]]]]]]]]]]])
Depth of field (post-processing effect).
Name | Type | Description |
---|---|---|
_focusStart | Real |
Distance from the camera from which are objects completely in focus. Ignored if AutoFocus is enabled. Defaults to 100. |
_focusEnd | Real |
Distance from the camera to which are objects completely in focus. Ignored if AutoFocus is enabled. Defaults to 200. |
_autoFocus | Bool |
If true then focus distance is automatically computed from the depth buffer. Defaults to false . |
_autoFocusRange | Real |
When AutoFocus is enabled, FocusStart is computed as focus distance - AutoFocusRange * 0.5 and FocusEnd as focus distance + AutoFocusRange * 0.5 . Defaults to 100. |
_autoFocusPoint | Struct.BBMOD_Vec2 |
Screen coordiate to sample the depth buffer at when AutoFocus is enabled. Use values in range (0, 0) (top left corner) to (1, 1) (bottom right corner). Defaults to (0.5, 0.5) (screen center) if undefined . |
_autoFocusFactor | Real |
Determines how fast the current focus distance lerps to the auto focus distance. Use values in range (0; 1] , where values closer to 0 mean slowly and 1 means immediately. Defaults to 0.1. |
_blurRangeNear | Real |
Distance over which objects transition from completely in focus to competely out of focus in the near plane. Defaults to 50. |
_blurRangeFar | Real |
Distance over which objects transition from completely in focus to completely out of focus in the far plane. Defaults to 50. |
_blurScaleNear | Real |
The scale of the blur size in the near plane. Use values in range 0..1, where 0 is disabled and 1 is full blur. Using values greater than 1 is possible but can produce visual artifacts. Defaults to 1. |
_blurScaleFar | Real |
The scale of the blur size in the far plane. Use values in range 0..1, where 0 is disabled and 1 is full blur. Using values greater than 1 is possible but can produce visual artifacts. Defaults to 1. |
_bokehShape | Real |
Controls the shape of bokeh. Use values greater or equal to 3 for number of edges. Values lower than 3 result into a perfect circle. Defaults to 6 (hexagon). |
_sampleCount | Real |
Number of samples taken when rendering the depth of field. Greater values produce better looking results but decrease performance. Defaults to 32. |
Name | Description |
---|---|
AutoFocus | If true then focus distance is automatically computed from the depth buffer. Default value is false . |
AutoFocusFactor | Determines how fast the current focus distance lerps to the auto focus distance. Use values in range (0; 1] , where values closer to 0 mean slowly and 1 means immediately. Default value is 0.1. |
AutoFocusPoint | Screen coordiate to sample the depth buffer at when AutoFocus is enabled. Use values in range (0, 0) (top left corner) to (1, 1) (bottom right corner). Default value is (0.5, 0.5) (screen center). |
AutoFocusRange | When AutoFocus is enabled, FocusStart is computed as focus distance - AutoFocusRange * 0.5 and FocusEnd as focus distance + AutoFocusRange * 0.5 . Default value is 100. |
BlurRangeFar | Distance over which objects transition from completely in focus to completely out of focus in the far plane. Default value is 50. |
BlurRangeNear | Distance over which objects transition from completely in focus to competely out of focus in the near plane. Default value is 50. |
BlurScaleFar | The scale of the blur size in the far plane. Use values in range 0..1, where 0 is disabled and 1 is full blur. Using values greater than 1 is possible but can produce visual artifacts. Default value is 1. |
BlurScaleNear | The scale of the blur size in the near plane. Use values in range 0..1, where 0 is disabled and 1 is full blur. Using values greater than 1 is possible but can produce visual artifacts. Default value is 1. |
BokehShape | Controls the shape of bokeh. Use values greater or equal to 3 for number of edges. Values lower than 3 result into a perfect circle. Default value is 6 (hexagon). |
FocusEnd | Distance from the camera to which are objects completely in focus. Ignored if AutoFocus is enabled. Default value is 200. |
FocusStart | Distance from the camera from which are objects completely in focus. Ignored if AutoFocus is enabled. Default value is 100. |
SampleCount | Number of samples taken when rendering the depth of field. Greater values produce better looking results but decrease performance. Default value is 32. |
Name | Description |
---|---|
Enabled | If true then the effect is enabled. Default value is true . |
PostProcessor | The post-processor to which is this effect added or undefined . |
Copyright © 2024, BlueBurn. Built on September 07, 2024 using GMDoc.