Struct blade_render::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
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_screen_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,
enable_debug_draw: bool,
accumulate_variance: bool,
reset_reservoirs: bool
)
pub fn prepare( &mut self, command_encoder: &mut CommandEncoder, camera: &Camera, enable_debug_draw: bool, accumulate_variance: bool, reset_reservoirs: bool )
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 !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