Skip to content

SimpleDOF.cs

For an example of how to use Multiplex.cs, consult the "4 - DOF Blur" scene located in "Holoplay/Examples".

Fields

The following 4 fields describe the DOF blur envelope.

start
dip
rise
end

All envelope values have depth values as measured in multiples of holoplay.size. Objects that appear between

  • negative infinity and start depth will appear with blurSize amount of blur
  • start depth and dip depth will appear at a linearly interpolated blur amount between blurSize and 0
  • dip depth and rise depth will appear at 0 blur
  • rise depth and end depth will appear at a linearly interpolated blur amount between 0 and blurSize
  • end and positive infinity will appear at blurSize amount of blur

holoplay

Type: Holoplay

Which Holoplay is this blur associated with

blurSize

Type: float

Amount of blur, as measured in pixels on a boxBlur

horizontalOnly

Type: bool

Usually SimpleDOF is applied to account for visual artifacts. With the Looking Glass, these artifacts only occur horizontally, so by default this script only blurs horizontally. Uncheck to blur horizontally and vertically.

testFocus

Type: bool

Displays a gradient to visualize the focus.

  • Black means in between dip and rise and therefore appears with no blur
  • White means before start or after end and therefore full blur amount