Renderer

Struct Renderer 

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

Blade Renderer is a comprehensive rendering solution for end user applications.

It takes care of the shaders, geometry buffers, acceleration structures, dummy resources, and debug drawing.

It doesn’t:

  • manage or submit any command encoders
  • know about the window to display on

Implementations§

Source§

impl Renderer

Source

pub fn new( encoder: &mut CommandEncoder, gpu: &Context, shaders: Shaders, shader_man: &AssetManager<Baker>, config: &RenderConfig, ) -> Self

Create a new renderer with a given configuration.

Panics if the system is not compatible. Records initialization routines into the given command encoder.

Source

pub fn destroy(&mut self, gpu: &Context)

Destroy all internally managed GPU resources.

Source

pub fn hot_reload( &mut self, asset_hub: &AssetHub, gpu: &Context, sync_point: &SyncPoint, ) -> bool

Source

pub fn get_surface_size(&self) -> Extent

Source

pub fn view_dummy_white(&self) -> TextureView

Source

pub fn view_environment_main(&self) -> TextureView

Source

pub fn view_environment_weight(&self) -> TextureView

Source

pub fn resize_screen( &mut self, size: Extent, encoder: &mut CommandEncoder, gpu: &Context, )

Source

pub fn build_scene( &mut self, command_encoder: &mut CommandEncoder, objects: &[Object], env_map: Option<Handle<Texture>>, asset_hub: &AssetHub, gpu: &Context, temp: &mut FrameResources, )

Source

pub fn prepare( &mut self, command_encoder: &mut CommandEncoder, camera: &Camera, config: FrameConfig, )

Prepare to render a frame.

Source

pub fn ray_trace( &self, command_encoder: &mut CommandEncoder, debug_config: DebugConfig, ray_config: RayConfig, )

Ray trace the scene.

The result is stored internally in an HDR render target.

Source

pub fn denoise( &mut self, command_encoder: &mut CommandEncoder, denoiser_config: DenoiserConfig, )

Perform noise reduction using SVGF.

Source

pub fn post_proc( &self, pass: &mut RenderCommandEncoder<'_>, debug_config: DebugConfig, pp_config: PostProcConfig, debug_lines: &[DebugLine], debug_blits: &[DebugBlit], )

Blit the rendering result into a specified render pass.

Source

pub fn read_debug_selection_info(&self) -> SelectionInfo

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> 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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.