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
 
impl Renderer
Sourcepub fn new(
    encoder: &mut CommandEncoder,
    gpu: &Context,
    shaders: Shaders,
    shader_man: &AssetManager<Baker>,
    config: &RenderConfig,
) -> Self
 
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.
pub fn hot_reload( &mut self, asset_hub: &AssetHub, gpu: &Context, sync_point: &SyncPoint, ) -> bool
pub fn get_surface_size(&self) -> Extent
pub fn view_dummy_white(&self) -> TextureView
pub fn view_environment_main(&self) -> TextureView
pub fn view_environment_weight(&self) -> TextureView
pub fn resize_screen( &mut self, size: Extent, encoder: &mut CommandEncoder, gpu: &Context, )
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, )
Sourcepub fn prepare(
    &mut self,
    command_encoder: &mut CommandEncoder,
    camera: &Camera,
    config: FrameConfig,
)
 
pub fn prepare( &mut self, command_encoder: &mut CommandEncoder, camera: &Camera, config: FrameConfig, )
Prepare to render a frame.
Sourcepub fn ray_trace(
    &self,
    command_encoder: &mut CommandEncoder,
    debug_config: DebugConfig,
    ray_config: RayConfig,
)
 
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.
Sourcepub fn denoise(
    &mut self,
    command_encoder: &mut CommandEncoder,
    denoiser_config: DenoiserConfig,
)
 
pub fn denoise( &mut self, command_encoder: &mut CommandEncoder, denoiser_config: DenoiserConfig, )
Perform noise reduction using SVGF.
Sourcepub fn post_proc(
    &self,
    pass: &mut RenderCommandEncoder<'_>,
    debug_config: DebugConfig,
    pp_config: PostProcConfig,
    debug_lines: &[DebugLine],
    debug_blits: &[DebugBlit],
)
 
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.
pub fn read_debug_selection_info(&self) -> SelectionInfo
Auto Trait Implementations§
impl !Freeze for Renderer
impl !RefUnwindSafe for Renderer
impl Send for Renderer
impl !Sync for Renderer
impl Unpin for Renderer
impl !UnwindSafe for Renderer
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