Expand description
Depth of field, a postprocessing effect that simulates camera focus.
By default, Bevy renders all objects in full focus: regardless of depth, all objects are rendered perfectly sharp (up to output resolution). Real lenses, however, can only focus on objects at a specific distance. The distance between the nearest and furthest objects that are in focus is known as depth of field, and this term is used more generally in computer graphics to refer to the effect that simulates focus of lenses.
Attaching DepthOfField
to a camera causes Bevy to simulate the
focus of a camera lens. Generally, Bevy’s implementation of depth of field
is optimized for speed instead of physical accuracy. Nevertheless, the depth
of field effect in Bevy is based on physical parameters.
Structs§
- The extra texture used as the second render target for the hexagonal bokeh blur.
- A component that enables a depth of field postprocessing effect when attached to a
Camera3d
, simulating the focus of a camera lens. - The bind group shared among all invocations of the depth of field shader, regardless of view.
- The layout for the bind group shared among all invocations of the depth of field shader.
- The node in the render graph for depth of field.
- Information needed to specialize the pipeline corresponding to a pass of the depth of field shader.
- A key that uniquely identifies depth of field pipelines.
- A plugin that adds support for the depth of field effect to Bevy.
- Data about the depth of field effect that’s uploaded to the GPU.
- Bind group layouts for depth of field specific to a single view.
Enums§
- Controls the appearance of the effect.
Functions§
- Given the sensor height and the FOV, returns the focal length.
- Configures depth textures so that the depth of field shader can read from them.
- Creates the second render target texture that the first pass of the bokeh effect needs.
- Creates depth of field bind group 1, which is shared among all instances of the depth of field shader.
- Specializes the depth of field pipelines specific to a view.
- Creates the bind group layouts for the depth of field effect that are specific to each view.
Type Aliases§
- Depth
OfField Settings Deprecated