Crate bevy_mod_outline
source ·Expand description
This crate provides a Bevy plugin, OutlinePlugin
, and associated components for
rendering outlines around meshes using the vertex extrusion method.
Outlines are rendered in a seperate pass following the main 3D pass. The effect of this pass is to present the outlines in depth sorted order according to the model translation of each mesh. This ensures that outlines are not clipped by non-outline geometry.
The OutlineVolume
component will, by itself, cover the original object entirely with
the outline colour. The OutlineStencil
component must also be added to prevent the body
of an object from being filled it. This must be added to any entity which needs to appear on
top of an outline.
The OutlineMode
component specifies the rendering method. Outlines may be flattened into
a plane in order to further avoid clipping, or left in real space.
The OutlineBundle
and OutlineStencilBundle
bundles can be used to add the right
components, including the required ComputedOutline
component. Outlines can be inherited
from the parent via the InheritOutline
component and InheritOutlineBundle
.
Vertex extrusion works best with meshes that have smooth surfaces. To avoid visual
artefacts when outlining meshes with hard edges, see the
OutlineMeshExt::generate_outline_normals
function and the
AutoGenerateOutlineNormalsPlugin
.
Structs§
- A component for triggering the
AsyncSceneInheritOutlinePlugin
. - Automatically inherits outlines for the entities in a scene.
- Automatically runs
generate_outline_normals
on every mesh. - A component for storing the computed depth at which the outline lies.
- A component for inheriting outlines from the parent entity.
- A bundle for inheriting outlines from the parent entity.
- A bundle for rendering stenciled outlines around meshes.
- Adds support for rendering outlines.
- A component for specifying what layer(s) the outline should be rendered for.
- A component for stenciling meshes during outline rendering.
- A bundle for stenciling meshes in the outlining pass.
- A component for rendering outlines around meshes.
Enums§
- Failed to generate outline normals for the mesh.
- Labels for render graph nodes which draw outlines.
- A component which specifies how the outline should be rendered.
Constants§
- The direction to extrude the vertex when rendering the outline.
Traits§
- Extension methods for
Mesh
.