Skip to main content

Renderer3D

Struct Renderer3D 

Source
pub struct Renderer3D { /* private fields */ }
Expand description

Zero-allocation UE5-class Deferred GGX PBR + Persistent Multi-Core SAH BVH + Lumen GI + Bloom + Morphological AA/TAA 3D renderer.

Implementations§

Source§

impl Renderer3D

High-FPS UE5-class Deferred GGX PBR + Persistent Multi-Core 32B SAH BVH + Lumen GI + Volumetric Fog + Bilinear Bloom + Geometry-Aware Morphological AA/TAA renderer.

Source

pub fn sample_sky(dir: Vec3, sun: &DirectionalLight3D) -> Vec3

Evaluates physically inspired Rayleigh + Mie atmospheric sky and HDR solar disk radiance along dir.

§Arguments
  • Vec3 - Unit view or reflection direction.
  • &DirectionalLight3D - Active sky & sun lighting parameters.
§Returns
  • Vec3 - Linear HDR sky radiance.
Source

pub fn render_world( &mut self, world: &mut World3D, viewport_w: u32, viewport_h: u32, quality: &RenderQualityConfig, ) -> ImageBuffer

Renders world at runtime-configured quality into an ImageBuffer without zero-filling output memory.

§Arguments
  • &Self - Mutable 3D renderer.
  • &mut World3D - Open-world 3D scene graph.
  • u32 - Target viewport width in logical pixels.
  • u32 - Target viewport height in logical pixels.
  • &RenderQualityConfig - Live runtime quality, resolution scale, LOD, and ray-tracing settings.
§Returns
  • ImageBuffer - Ready RGBA8 rendered 3D frame for immediate presentation.
Source

pub fn render_world_rgba( &mut self, world: &mut World3D, viewport_w: u32, viewport_h: u32, quality: &RenderQualityConfig, ) -> &[u8] ⓘ

Renders world into the persistent internal rgba_scratch buffer, eliminating per-frame output heap allocations.

§Arguments
  • &Self - Mutable 3D renderer.
  • &mut World3D - Open-world 3D scene graph.
  • u32 - Target viewport width in logical pixels.
  • u32 - Target viewport height in logical pixels.
  • &RenderQualityConfig - Live runtime quality, resolution scale, LOD, and ray-tracing settings.
§Returns
  • &[u8] - Borrowed RGBA8 pixel slice of the rendered 3D frame.
Source§

impl Renderer3D

Source

pub fn get_color_buffer(&self) -> &Vec<u8> ⓘ

Source

pub fn get_mut_color_buffer(&mut self) -> &mut Vec<u8> ⓘ

Source

pub fn set_color_buffer(&mut self, val: Vec<u8>) -> &mut Self

Source

pub fn get_aa_buffer(&self) -> &Vec<u8> ⓘ

Source

pub fn get_mut_aa_buffer(&mut self) -> &mut Vec<u8> ⓘ

Source

pub fn set_aa_buffer(&mut self, val: Vec<u8>) -> &mut Self

Source

pub fn get_depth_buffer(&self) -> &Vec<f32>

Source

pub fn get_mut_depth_buffer(&mut self) -> &mut Vec<f32>

Source

pub fn set_depth_buffer(&mut self, val: Vec<f32>) -> &mut Self

Source

pub fn get_width(&self) -> u32

Source

pub fn get_mut_width(&mut self) -> &mut u32

Source

pub fn set_width(&mut self, val: u32) -> &mut Self

Source

pub fn get_height(&self) -> u32

Source

pub fn get_mut_height(&mut self) -> &mut u32

Source

pub fn set_height(&mut self, val: u32) -> &mut Self

Source

pub fn get_last_stats(&self) -> RenderStats3D

Source

pub fn get_mut_last_stats(&mut self) -> &mut RenderStats3D

Source

pub fn set_last_stats(&mut self, val: RenderStats3D) -> &mut Self

Trait Implementations§

Source§

impl Clone for Renderer3D

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Renderer3D

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Renderer3D

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.