pub struct GpuLine {
pub a: [f32; 3],
pub b: [f32; 3],
pub color: [f32; 4],
pub width_px: f32,
pub depth_test: bool,
}Expand description
WGPU-backed renderer. Owns the device, queue, and surface
bound to the host’s window. GpuRenderer::render is the GPU.1
clear-to-colour path; GpuRenderer::render_scene is the
multi-grid scene marcher.
The window is consumed only at construction — wgpu’s
Surface<'static> keeps its own Arc clone of the handle, so
the renderer holds no window field of its own.
A world-space line segment for GpuRenderer::draw_lines_deferred.
color is straight RGBA in 0..=1 (the alpha drives the over-blend);
width_px is the screen-space thickness; depth_test occludes the
segment behind nearer marched geometry.
Fields§
§a: [f32; 3]First endpoint, world voxel units.
b: [f32; 3]Second endpoint, world voxel units.
color: [f32; 4]Straight (non-premultiplied) RGBA, each channel 0..=1; alpha
drives the over-blend onto the frame.
width_px: f32Screen-space line thickness in pixels; values below 1.0 are
clamped up to 1 px.
depth_test: booltrue ⇒ fragments behind nearer marched scene geometry are
discarded (with a small bias so surface-hugging lines don’t
z-fight); false ⇒ always drawn on top.