ravenrs_render/lib.rs
1//! The RavenRS render engine.
2//!
3//! [`Renderer`] turns a [`ravenrs_core::Scene`] into one wgpu render pass:
4//!
5//! * **Quads** (rounded rectangles, borders, linear gradients, soft shadows) are
6//! instanced and shaded with a signed-distance function (`shaders/quad.wgsl`),
7//! so edges are anti-aliased analytically at any scale factor.
8//! * **Images** are textures with a full mip chain, cached by image id, drawn
9//! with the same rounded-corner SDF mask as quads (`shaders/image.wgsl`).
10//! * **Text** is rasterized once per glyph/size/subpixel offset with `swash` into
11//! an R8 atlas and drawn as textured quads (`shaders/glyph.wgsl`).
12//!
13//! Consecutive primitives of the same kind are batched; painter's order is kept.
14//! Instance buffers are reused and only grow. Nothing is read back from the GPU.
15//!
16//! The crate does not own windows or surfaces: platform crates create the
17//! device and call [`Renderer::render`] with the frame's texture view.
18
19mod atlas;
20mod gpu;
21mod images;
22mod paths;
23mod renderer;
24mod timing;
25
26pub use gpu::{GpuContext, GpuError, gpu_report, preferred_surface_format, surface_report};
27pub use renderer::{RenderStats, Renderer};
28pub use wgpu;