Byte Engine Docs
View on docs.rs

render_pass

Generated Rust API reference for byte_engine.

byte_engine / rendering / render_pass


Module render_pass

Composable sink-local rendering stages.

Implement RenderPass for post-processing or overlays that run after scene pipelines. Construct resources through RenderPassBuilder so the renderer can track access policies and named render targets. Existing implementations live in crate::rendering::render_passes. Replace the color flowing through the graph with RenderPassBuilder::create_main_render_target. The builder supplies an intermediate image or the swapchain without exposing graph position to the pass.

Contents

Quick Reference

ItemKindDescription
simple_computemodReusable construction for BESL compute render passes that bind their resources by name.
SceneBackgroundTargetsstructThe SceneBackgroundTargets struct hands a scene background the scene pipeline's own targets.
SceneBackgroundstructThe SceneBackground struct shares one sink's background pass between the scene pipeline that records it and the renderer that asks it for frames.
RenderPassBuilderstructThe [RenderPassBuilder] struct provides sink resources and records the dependencies of a render pass.
ReadFromResultstruct
RenderToResultstruct
MainRenderTargetstructThe MainRenderTarget struct hides whether a replacement main output is an image or the sink swapchain.
RenderPassStateenumThe RenderPassState enum identifies which preparation path a render pass uses: [RenderPass::prepare] or [RenderPass::bypass].
RenderPasstraitThe RenderPass trait defines a composable rendering step for a prepared sink.
allocate_render_commandfnAllocates a prepared render command in the application frame allocator.
RenderPassReturntypeA frame-allocated command that records one render pass.
SceneBackgroundFactorytypeBuilds the pass that fills a scene's background for one sink; see [RenderPassBuilder::create_scene_background].

Modules

  • simple_compute — Reusable construction for BESL compute render passes that bind their resources by name.

Structs

SceneBackgroundTargets

struct SceneBackgroundTargets {
    pub color: ghi::BaseImageHandle,
    pub depth: ghi::BaseImageHandle,
}

Defined in crates/byte-engine/src/rendering/render_pass.rs:166-171

The SceneBackgroundTargets struct hands a scene background the scene pipeline's own targets.

They belong to the scene pipeline's render node, so the background uses them directly instead of declaring them through RenderPassBuilder::read_from or RenderPassBuilder::render_to.

Fields

  • color: ghi::BaseImageHandle

    The scene color, written in place wherever depth is at infinity.

  • depth: ghi::BaseImageHandle

    The scene's reverse-Z depth, where 0 means no surface.

Trait Implementations

impl ArchivePointee for SceneBackgroundTargets
  • type ArchivedMetadata = ()
  • fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for SceneBackgroundTargets
impl Clone for SceneBackgroundTargets
impl Copy for SceneBackgroundTargets
impl Downcast for SceneBackgroundTargets
  • fn into_any(self: Box<T>) -> Box<dyn Any>
  • fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
  • fn as_any(&self) -> &dyn Any
  • fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for SceneBackgroundTargets
  • fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Instrument for SceneBackgroundTargets
impl LayoutRaw for SceneBackgroundTargets
  • fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for SceneBackgroundTargets
  • unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
  • fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for SceneBackgroundTargets
  • type Metadata = ()
impl Read for SceneBackgroundTargets
impl WithSubscriber for SceneBackgroundTargets

SceneBackground

struct SceneBackground();

Defined in crates/byte-engine/src/rendering/render_pass.rs:180

The SceneBackground struct shares one sink's background pass between the scene pipeline that records it and the renderer that asks it for frames.

A scene pipeline records it after opaque surfaces and before transparent ones, so transparent surfaces composite over the background inside the scene color and the scene color needs no coverage channel. Its RenderPassState is shared by name like any other pass.

Implementations

  • fn prepare<'a>(&self, frame: &mut ghi::implementation::Frame<'_>, sink: &Sink, frame_allocator: &'a bumpalo::Bump) -> Option<RenderPassReturn<'a>>

    Related: Sink, RenderPassReturn

    Prepares the active or bypass path selected by the background's state.

Trait Implementations

impl ArchivePointee for SceneBackground
  • type ArchivedMetadata = ()
  • fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for SceneBackground
impl Clone for SceneBackground
impl Downcast for SceneBackground
  • fn into_any(self: Box<T>) -> Box<dyn Any>
  • fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
  • fn as_any(&self) -> &dyn Any
  • fn as_any_mut(&mut self) -> &mut dyn Any
impl Instrument for SceneBackground
impl LayoutRaw for SceneBackground
  • fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for SceneBackground
  • unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
  • fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for SceneBackground
  • type Metadata = ()
impl Read for SceneBackground
impl WithSubscriber for SceneBackground

RenderPassBuilder<'a>

struct RenderPassBuilder<'a> {
    // [REDACTED: Private Fields]
}

Defined in crates/byte-engine/src/rendering/render_pass.rs:207-231

The RenderPassBuilder struct provides sink resources and records the dependencies of a render pass.

Declare auxiliary outputs with Self::create_render_target or Self::render_to and inputs with Self::read_from. Use Self::create_main_render_target for a replacement color result so the renderer can select the final destination. Then construct the RenderPass that records commands for those resources.

Implementations

  • fn debug_views(&mut self, views: &'static [&'static str]) -> DebugViews

    Related: DebugViews

    Declares the debug views this pass can show, at most MAX_VIEWS_PER_PASS, in the order the shader numbers

    them from 0, and returns the pool they write into.

    Each view is selectable as render.debug.view.<pass name>.<view name>, where the pass name is

    RenderPass::name or the scene pipeline manager's name. The renderer records this pass as a writer of every

    pool slot. When the project leaves debug views out, the result reports no view shown and holds no targets.

    Call it once per pass.

    Panics

    Panics on a second call, on more than MAX_VIEWS_PER_PASS views, or on a view name with a dot.

  • fn create_gpu_counter(&mut self, name: &str) -> ghi::CounterHandle

    Creates a GPU timing counter for one stage of this node's commands, which the inspector reports as

    stage.<name> next to the node's own scene.<manager> or pass.<name> time.

    Wrap the stage's commands with ghi::command_buffer::CommonCommandBufferMode::counter inside the node's

    recording, once per frame, and only on frames the stage records: a counter around no commands reports a

    meaningless near-zero time. Stage counters nest inside the node's counter, so a node's stages add up to its

    time plus whatever it records outside them.

  • fn create_scene_background(&mut self, targets: SceneBackgroundTargets) -> Option<SceneBackground>

    Related: SceneBackgroundTargets, SceneBackground

    Creates this sink's scene background, or returns None when the application registered none.

    Scene pipelines call this with their color and depth targets. Record the result after opaque surfaces and

    before transparent ones.

  • fn alias(&mut self, orig: &'a str, alias: &'a str)
  • fn format_of(&self, name: &str) -> ghi::Formats
  • fn render_to(&mut self, name: &'a str) -> RenderToResult

    Related: RenderToResult

    Returns an existing image for writing by this render pass.

  • fn create_render_target(&mut self, builder: ghi::image::Builder<'a>) -> RenderToResult

    Related: RenderToResult

    Creates a transferable render-target image and returns it for writing by this render pass.

  • fn create_scaled_render_target(&mut self, builder: ghi::image::Builder<'a>, resolution_divisor: u32) -> RenderToResult

    Related: RenderToResult

    Creates a transferable render-target image at a fraction of the sink resolution.

    The renderer sizes the image to the sink extent divided by resolution_divisor, so 2 gives a

    half-resolution target. Like every render target, it can be captured by name for debugging.

    The target holds valid contents only between the first and the last pass of a frame that uses it, since

    targets whose uses do not overlap share memory. Its contents are undefined when its first pass starts, so that

    pass must write every pixel it later reads. Use Self::create_persistent_render_target for contents that

    must survive into the next frame.

  • fn create_persistent_render_target(&mut self, builder: ghi::image::Builder<'a>) -> RenderToResult

    Related: RenderToResult

    Creates a full-resolution render target whose contents stay valid across frames.

    Use it for images a pass updates incrementally, such as a layer that only redraws damaged regions. Unlike

    Self::create_render_target, the target never shares memory with other targets.

  • fn create_history_target(&mut self, builder: ghi::image::Builder<'a>, resolution_divisor: u32) -> ghi::DynamicImageHandle

    Creates a sink-sized image that keeps one copy per frame in flight, so later frames can read it as history.

    The renderer sizes the image to the sink extent divided by resolution_divisor, but never binds it as an

    attachment, so no pass clears it.

    The creating pass writes this frame's copy. Any pass reads the previous frame's copy by binding the handle

    with ghi::DescriptorWrite::combined_image_sampler_with_frame and an offset of -1.

    A previous-frame copy holds no usable data on a sink's first frame or right after a resize, so the reading pass

    must track whether it recorded the sink at the same extent in the previous frame.

  • fn create_main_render_target(&mut self, builder: ghi::image::Builder<'a>) -> MainRenderTarget

    Related: MainRenderTarget

    Creates a replacement for the color image named main.

    The renderer supplies the sink swapchain when this pass is terminal. In

    every other position, this creates and aliases the requested image. Bind

    the returned target as a writable image without inspecting its variant.

    Compute shaders must use a formatless storage-image output because the

    swapchain format can differ from the intermediate format. Raster passes

    should derive their attachment descriptor from the returned target. Next,

    bind a compute output with simple_compute::Resource::image.

    While the pass is bypassed, the renderer copies the incoming main into the replacement, so later passes read

    the image this pass would have transformed.

  • fn read_from(&mut self, name: &'a str) -> ReadFromResult

    Related: ReadFromResult

  • fn context(&mut self) -> &mut ghi::implementation::Context
  • fn pipeline_manager(&self) -> &crate::rendering::PipelineManagerClient

    Related: PipelineManagerClient

    Returns a client for requesting pipelines shared by renderer dependants.

Trait Implementations

impl ArchivePointee for RenderPassBuilder<'a>
  • type ArchivedMetadata = ()
  • fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for RenderPassBuilder<'a>
impl Downcast for RenderPassBuilder<'a>
  • fn into_any(self: Box<T>) -> Box<dyn Any>
  • fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
  • fn as_any(&self) -> &dyn Any
  • fn as_any_mut(&mut self) -> &mut dyn Any
impl Instrument for RenderPassBuilder<'a>
impl LayoutRaw for RenderPassBuilder<'a>
  • fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for RenderPassBuilder<'a>
  • unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
  • fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for RenderPassBuilder<'a>
  • type Metadata = ()
impl Read for RenderPassBuilder<'a>
impl WithSubscriber for RenderPassBuilder<'a>

ReadFromResult

struct ReadFromResult {
    // [REDACTED: Private Fields]
}

Defined in crates/byte-engine/src/rendering/render_pass.rs:574-576

Trait Implementations

impl ArchivePointee for ReadFromResult
  • type ArchivedMetadata = ()
  • fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for ReadFromResult
impl Clone for ReadFromResult
impl Copy for ReadFromResult
impl Downcast for ReadFromResult
  • fn into_any(self: Box<T>) -> Box<dyn Any>
  • fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
  • fn as_any(&self) -> &dyn Any
  • fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for ReadFromResult
  • fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Instrument for ReadFromResult
impl LayoutRaw for ReadFromResult
  • fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for ReadFromResult
  • unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
  • fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for ReadFromResult
  • type Metadata = ()
impl Read for ReadFromResult
impl WithSubscriber for ReadFromResult

RenderToResult

struct RenderToResult {
    // [REDACTED: Private Fields]
}

Defined in crates/byte-engine/src/rendering/render_pass.rs:591-594

Trait Implementations

impl ArchivePointee for RenderToResult
  • type ArchivedMetadata = ()
  • fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for RenderToResult
impl Clone for RenderToResult
impl Copy for RenderToResult
impl Downcast for RenderToResult
  • fn into_any(self: Box<T>) -> Box<dyn Any>
  • fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
  • fn as_any(&self) -> &dyn Any
  • fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for RenderToResult
  • fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Instrument for RenderToResult
impl LayoutRaw for RenderToResult
  • fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for RenderToResult
  • unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
  • fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for RenderToResult
  • type Metadata = ()
impl Read for RenderToResult
impl WithSubscriber for RenderToResult

MainRenderTarget

struct MainRenderTarget {
    // [REDACTED: Private Fields]
}

Defined in crates/byte-engine/src/rendering/render_pass.rs:619-622

The MainRenderTarget struct hides whether a replacement main output is an image or the sink swapchain.

Pass it directly to simple_compute::Resource::image or convert it into a raster attachment descriptor.

Trait Implementations

impl ArchivePointee for MainRenderTarget
  • type ArchivedMetadata = ()
  • fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for MainRenderTarget
impl Clone for MainRenderTarget
impl Copy for MainRenderTarget
impl Downcast for MainRenderTarget
  • fn into_any(self: Box<T>) -> Box<dyn Any>
  • fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
  • fn as_any(&self) -> &dyn Any
  • fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for MainRenderTarget
  • fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Instrument for MainRenderTarget
impl LayoutRaw for MainRenderTarget
  • fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for MainRenderTarget
  • unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
  • fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for MainRenderTarget
  • type Metadata = ()
impl Read for MainRenderTarget
impl WithSubscriber for MainRenderTarget

Enums

RenderPassState

enum RenderPassState {
    Enabled,
    Bypassed,
}

Defined in crates/byte-engine/src/rendering/render_pass.rs:88-92

The RenderPassState enum identifies which preparation path a render pass uses: RenderPass::prepare or RenderPass::bypass.

Trait Implementations

impl ArchivePointee for RenderPassState
  • type ArchivedMetadata = ()
  • fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for RenderPassState
impl Clone for RenderPassState
impl Copy for RenderPassState
impl Debug for RenderPassState
  • fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Default for RenderPassState
impl Downcast for RenderPassState
  • fn into_any(self: Box<T>) -> Box<dyn Any>
  • fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
  • fn as_any(&self) -> &dyn Any
  • fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for RenderPassState
  • fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Eq for RenderPassState
impl<K> Equivalent for RenderPassState
  • fn equivalent(&self, key: &K) -> bool
impl Instrument for RenderPassState
impl LayoutRaw for RenderPassState
  • fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for RenderPassState
  • unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
  • fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for RenderPassState
impl Pointee for RenderPassState
  • type Metadata = ()
impl Read for RenderPassState
impl<R> ReadPrimitive for RenderPassState
impl StructuralPartialEq for RenderPassState
impl WithSubscriber for RenderPassState

Traits

RenderPass

trait RenderPass { ... }

Defined in crates/byte-engine/src/rendering/render_pass.rs:48-83

The RenderPass trait defines a composable rendering step for a prepared sink.

Build persistent images and shader state through RenderPassBuilder, then return frame-local recording work from Self::prepare. Register the implementation with crate::rendering::renderer::Renderer.

Required Methods

  • fn name(&self) -> &'static str

    Returns the stable name used to control every sink-local instance of this pass.

  • fn prepare<'a>(&mut self, frame: &mut ghi::implementation::Frame<'_>, sink: &Sink, frame_allocator: &'a bumpalo::Bump) -> Option<RenderPassReturn<'a>>

    Prepares the render pass when its rendering condition is active.

Provided Methods

  • fn bypass<'a>(&mut self, _frame: &mut ghi::implementation::Frame<'_>, _sink: &Sink, _frame_allocator: &'a bumpalo::Bump) -> Option<RenderPassReturn<'a>>

    Prepares the maintenance work this pass still needs while it is bypassed.

  • fn needs_frame(&mut self) -> bool

    Reports whether this pass has output that the last presented frame does not show yet.

Implementors

Functions

allocate_render_command

fn allocate_render_command<'a>(frame_allocator: &'a bumpalo::Bump, command: impl RenderPassFunction + Send + Sync + 'a) -> RenderPassReturn<'a>

Defined in crates/byte-engine/src/rendering/render_pass.rs:36-41

Allocates a prepared render command in the application frame allocator.

Type Aliases

RenderPassReturn<'a>

type RenderPassReturn<'a> = &'a dyn RenderPassFunction + Send + Sync;

Defined in crates/byte-engine/src/rendering/render_pass.rs:33

A frame-allocated command that records one render pass.

SceneBackgroundFactory

type SceneBackgroundFactory = dyn Fn(&'builder mut RenderPassBuilder<'resources>, SceneBackgroundTargets) -> utils::Box<dyn RenderPass>;

Defined in crates/byte-engine/src/rendering/render_pass.rs:156-159

Builds the pass that fills a scene's background for one sink; see RenderPassBuilder::create_scene_background.

On this page

Module render_passContentsQuick ReferenceModulesStructsSceneBackgroundTargetsFieldsTrait Implementationsimpl ArchivePointee for SceneBackgroundTargetsimpl<ST> CastableFrom for SceneBackgroundTargetsimpl Clone for SceneBackgroundTargetsimpl Copy for SceneBackgroundTargetsimpl Downcast for SceneBackgroundTargetsimpl DowncastSync for SceneBackgroundTargetsimpl Instrument for SceneBackgroundTargetsimpl LayoutRaw for SceneBackgroundTargetsimpl<T, N1> Niching for SceneBackgroundTargetsimpl Pointee for SceneBackgroundTargetsimpl Read for SceneBackgroundTargetsimpl WithSubscriber for SceneBackgroundTargetsSceneBackgroundImplementationsTrait Implementationsimpl ArchivePointee for SceneBackgroundimpl<ST> CastableFrom for SceneBackgroundimpl Clone for SceneBackgroundimpl Downcast for SceneBackgroundimpl Instrument for SceneBackgroundimpl LayoutRaw for SceneBackgroundimpl<T, N1> Niching for SceneBackgroundimpl Pointee for SceneBackgroundimpl Read for SceneBackgroundimpl WithSubscriber for SceneBackgroundRenderPassBuilder<'a>ImplementationsPanicsTrait Implementationsimpl ArchivePointee for RenderPassBuilder<'a>impl<ST> CastableFrom for RenderPassBuilder<'a>impl Downcast for RenderPassBuilder<'a>impl Instrument for RenderPassBuilder<'a>impl LayoutRaw for RenderPassBuilder<'a>impl<T, N1> Niching for RenderPassBuilder<'a>impl Pointee for RenderPassBuilder<'a>impl Read for RenderPassBuilder<'a>impl WithSubscriber for RenderPassBuilder<'a>ReadFromResultTrait Implementationsimpl ArchivePointee for ReadFromResultimpl<ST> CastableFrom for ReadFromResultimpl Clone for ReadFromResultimpl Copy for ReadFromResultimpl Downcast for ReadFromResultimpl DowncastSync for ReadFromResultimpl Instrument for ReadFromResultimpl LayoutRaw for ReadFromResultimpl<T, N1> Niching for ReadFromResultimpl Pointee for ReadFromResultimpl Read for ReadFromResultimpl WithSubscriber for ReadFromResultRenderToResultTrait Implementationsimpl ArchivePointee for RenderToResultimpl<ST> CastableFrom for RenderToResultimpl Clone for RenderToResultimpl Copy for RenderToResultimpl Downcast for RenderToResultimpl DowncastSync for RenderToResultimpl Instrument for RenderToResultimpl LayoutRaw for RenderToResultimpl<T, N1> Niching for RenderToResultimpl Pointee for RenderToResultimpl Read for RenderToResultimpl WithSubscriber for RenderToResultMainRenderTargetTrait Implementationsimpl ArchivePointee for MainRenderTargetimpl<ST> CastableFrom for MainRenderTargetimpl Clone for MainRenderTargetimpl Copy for MainRenderTargetimpl Downcast for MainRenderTargetimpl DowncastSync for MainRenderTargetimpl Instrument for MainRenderTargetimpl LayoutRaw for MainRenderTargetimpl<T, N1> Niching for MainRenderTargetimpl Pointee for MainRenderTargetimpl Read for MainRenderTargetimpl WithSubscriber for MainRenderTargetEnumsRenderPassStateTrait Implementationsimpl ArchivePointee for RenderPassStateimpl<ST> CastableFrom for RenderPassStateimpl Clone for RenderPassStateimpl Copy for RenderPassStateimpl Debug for RenderPassStateimpl Default for RenderPassStateimpl Downcast for RenderPassStateimpl DowncastSync for RenderPassStateimpl Eq for RenderPassStateimpl<K> Equivalent for RenderPassStateimpl Instrument for RenderPassStateimpl LayoutRaw for RenderPassStateimpl<T, N1> Niching for RenderPassStateimpl PartialEq for RenderPassStateimpl Pointee for RenderPassStateimpl Read for RenderPassStateimpl<R> ReadPrimitive for RenderPassStateimpl StructuralPartialEq for RenderPassStateimpl WithSubscriber for RenderPassStateTraitsRenderPassRequired MethodsProvided MethodsImplementorsFunctionsallocate_render_commandType AliasesRenderPassReturn<'a>SceneBackgroundFactory