Crate re_renderer
source ·Expand description
Rerun’s renderer.
A wgpu based renderer wgpu for all your visualization needs.
Used in re_runner
to display the contents of any view contents other than pure UI.
§Feature flags
arrow
— Support for Arrow datatypes for end-to-end zero-copy.import-obj
(enabled by default) — Support importing .obj filesimport-gltf
(enabled by default) — Support importing .gltf and .glb filesimport-stl
(enabled by default) — Support importing binary & ascii .stl filesserde
— Enable (de)serialization using serde.
Re-exports§
pub use importer::CpuMeshInstance;
pub use importer::CpuModel;
pub use importer::CpuModelMeshKey;
pub use texture_info::Texture2DBufferInfo;
pub use view_builder::ViewBuilder;
Modules§
- High level GPU memory allocators.
- color 🔒
- colormap 🔒
- context 🔒
- This module implements one half of our cross-platform #import system.
- rect 🔒
- Resource managers are concerned with mapping (typically) higher level user data to their Gpu representation.
- size 🔒
- Transformation utilities.
- Explicitly padded and/or aligned types following wgsl rules. See wgsl spec on alignment and size
- Wgpu resource pools are concerned with handling low level gpu resources efficiently.
Macros§
- A macro to read the contents of a file on disk, and resolve #import clauses as required.
- Create a shader module using the
include_file!
macro and set the path name as debug string.
Structs§
- This format is used for space-efficient color representation (32 bits).
- Label for resources. Optimized out in release builds.
- The
FileResolver
handles both resolving import clauses and doing the actual string interpolation. - A file server capable of watching filesystem events in the background and resolve #import clauses in files.
- Hue, saturation, value, alpha. All in the range [0, 1]. No premultiplied alpha.
- A pre-parsed import clause, as in
#import <something>
. - Builder for a vector of line strips, making it easy to create
crate::renderer::LineDrawData
. - What outline (if any) should be drawn.
- Combination of
PickingLayerObjectId
andPickingLayerInstanceId
. - The second 64bit of the picking layer.
- The first 64bit of the picking layer.
- Manages the rendering of the picking layer pass, its render targets & readback buffer.
- Builder for point clouds, making it easy to create
crate::renderer::PointCloudDrawData
. - Type erased draw data that can be submitted directly to the view builder.
- A 2D rectangle with float coordinates.
- A 2D rectangle with integer coordinates.
- Defines a transformation from a rectangular region of interest into a rectangular target region.
- Any resource involving wgpu rendering which can be re-used across different scenes. I.e. render pipelines, resource pools, etc.
- 0-1 linear space
RGBA
color with premultiplied alpha. - RGBA color in sRGB gamma space, with separate/unmultiplied linear alpha.
- Specifies where to look for imports when both absolute and relative resolution fail.
- A size of something in either scene units or ui points.
Enums§
Traits§
- A very limited filesystem, just enough for our internal needs.
Functions§
- A human-readable summary about an adapter
- Returns a gamma-space sRGB in 0-255 range. This is a perceptually uniform colormap which is robust to color blindness. It is especially suited for visualizing signed values. It interpolates from cyan to blue to dark gray to brass to yellow.
- Returns sRGB polynomial approximation from Inferno color map, assuming
t
is normalized. - Returns sRGB polynomial approximation from Magma color map, assuming
t
is normalized. - Returns sRGB polynomial approximation from Plasma color map, assuming
t
is normalized. - Returns sRGB polynomial approximation from Turbo color map, assuming
t
is normalized. - Returns sRGB polynomial approximation from Viridis color map, assuming
t
is normalized. - Returns the recommended filesystem handle for the current platform.
- Returns an sRGB gray value, assuming
t
is normalized. - Returns the recommended
FileResolver
for the current platform/target. - Pad
RGB
toRGBA
with the given alpha.
Type Aliases§
- Depth offset used to resolve z-fighting between 2D primitives.
- Identifier used to identify a buffer upon retrieval of the data.
- The recommended
FileResolver
type for the current platform/target.