Expand description

crates.io docs.rs

Render millions of AABBs every frame with an instancing renderer.

Example

Demo

cargo run --example wave --release

Features

  • vertex pulling renderer
  • cuboid edge shading
  • edge-only wireframes
  • clipping planes
  • multiple color modes: RGB and Linear-Range Scalar
  • depth jitter to counteract z-fighting of coplanar cuboids

License

Licensed under the Apache License Version 2.0 by copyright holders Duncan Fairbanks and Foresight Mining Software Corporation.

Sponsors

The creation and maintenance of bevy_aabb_instancing is sponsored by Foresight Mining Software Corporation.

Foresight Mining Software Corporation

Structs

The range of signed distances from the plane that don’t get clipped.
Shading options, constant for each draw call.
Denotes which ColorOptions to use when rendering Cuboids.
Resource used to create and modify a set of ColorOptions that are automatically synced to shader uniforms.
An axis-aligned box, extending from minimum to maximum.
A set of cuboids to be extracted for rendering.
Dynamic controls for coloring and visibility of scalar values encoded in cuboid.color.
Renders the Cuboids component using the “vertex pulling” technique.

Constants

“Manual” coloring based on RGB-valued cuboid.color.
“Automatic” coloring based on scalar-valued cuboid.color. See ScalarHueColorOptions.
The clipping shader is O(planes * cuboids), so we set a reasonable limit.

Type Definitions

Value that determines the color of a Cuboid based on the associated ColorOptions.
Bare enum for toggling shader behavior for [Color].
Metadata encoded in 32 bits: