pub struct GpuCamera { /* private fields */ }Expand description
GPU camera renderer — uses the same device as GpuTracer.
Implementations§
Source§impl GpuCamera
impl GpuCamera
Sourcepub async fn render(
&self,
width: u32,
height: u32,
samples_per_pixel: u32,
camera_pos: [f32; 3],
look_at: [f32; 3],
fov_degrees: f32,
primitives: &[GpuPrimitive],
materials: &[GpuMaterial],
source_intensity: f32,
source_pos: [f32; 3],
) -> CameraImage
pub async fn render( &self, width: u32, height: u32, samples_per_pixel: u32, camera_pos: [f32; 3], look_at: [f32; 3], fov_degrees: f32, primitives: &[GpuPrimitive], materials: &[GpuMaterial], source_intensity: f32, source_pos: [f32; 3], ) -> CameraImage
Render an image of the scene.
lvk_data: optional flat array of intensity values [c0g0, c0g1, …, c1g0, …] for
LDT-based light emission. If empty, uses uniform emission.
Sourcepub async fn render_with_lvk(
&self,
width: u32,
height: u32,
samples_per_pixel: u32,
camera_pos: [f32; 3],
look_at: [f32; 3],
fov_degrees: f32,
primitives: &[GpuPrimitive],
materials: &[GpuMaterial],
source_intensity: f32,
source_pos: [f32; 3],
lvk_data: &[f32],
lvk_c_steps: u32,
lvk_g_steps: u32,
lvk_g_max: f32,
lvk_max_intensity: f32,
) -> CameraImage
pub async fn render_with_lvk( &self, width: u32, height: u32, samples_per_pixel: u32, camera_pos: [f32; 3], look_at: [f32; 3], fov_degrees: f32, primitives: &[GpuPrimitive], materials: &[GpuMaterial], source_intensity: f32, source_pos: [f32; 3], lvk_data: &[f32], lvk_c_steps: u32, lvk_g_steps: u32, lvk_g_max: f32, lvk_max_intensity: f32, ) -> CameraImage
Render with LDT-based light emission pattern.
Auto Trait Implementations§
impl Freeze for GpuCamera
impl !RefUnwindSafe for GpuCamera
impl Send for GpuCamera
impl Sync for GpuCamera
impl Unpin for GpuCamera
impl UnsafeUnpin for GpuCamera
impl !UnwindSafe for GpuCamera
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.