pub enum RayTraceBackend {
Canvas2D,
WebGl2,
WebGpu,
}Expand description
The rendering backend a RayTraceRenderer drives.
The backend is chosen by the caller at construction and is never substituted afterwards: a renderer that was asked for WebGPU reports an error when the GPU path fails instead of quietly drawing through Canvas 2D, because a silent substitution turns a diagnosable validation error into a silently slower frame with different pixels.
Variants§
Canvas2D
The CPU reference path: the frame is traced on the CPU and blitted
through an ImageData upload.
WebGl2
The WebGL 2 path: a fullscreen triangle samples two RGBA32F data textures and writes the default framebuffer.
WebGpu
The WebGPU path: a fullscreen triangle reads two storage buffers through a bind group and writes the swap-chain texture.
Trait Implementations§
Source§impl Clone for RayTraceBackend
impl Clone for RayTraceBackend
impl Copy for RayTraceBackend
Source§impl Debug for RayTraceBackend
impl Debug for RayTraceBackend
Source§impl Default for RayTraceBackend
impl Default for RayTraceBackend
impl Eq for RayTraceBackend
Source§impl Hash for RayTraceBackend
impl Hash for RayTraceBackend
Source§impl PartialEq for RayTraceBackend
impl PartialEq for RayTraceBackend
impl StructuralPartialEq for RayTraceBackend
Auto Trait Implementations§
impl Freeze for RayTraceBackend
impl RefUnwindSafe for RayTraceBackend
impl Send for RayTraceBackend
impl Sync for RayTraceBackend
impl Unpin for RayTraceBackend
impl UnsafeUnpin for RayTraceBackend
impl UnwindSafe for RayTraceBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more