Byte Engine Docs
View on docs.rs

sink

Generated Rust API reference for byte_engine.

byte_engine / rendering / sink


Module sink

Per-output render target state passed to render passes.

Quick Reference

ItemKindDescription
SinkstructThe Sink struct provides a per-frame render destination for a resolved camera view.

Structs

Sink

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

Defined in crates/byte-engine/src/rendering/sink.rs:11-17

The Sink struct provides a per-frame render destination for a resolved camera view.

It keeps the view transform, renderable extent, camera exposure, frame interval, and renderer sink index together while scene managers and render passes prepare an output surface.

Implementations

  • fn new(view: View, extent: Extent, index: usize) -> Self

    Related: View

    Creates a sink with neutral exposure for render passes that target a specific view and extent.

    Next, call Self::with_exposure_scale when the view comes from a crate::rendering::Camera.

  • fn with_exposure_scale(self, exposure_scale: f32) -> Self

    Sets the camera exposure as a linear factor, as returned by crate::rendering::Camera::exposure_scale.

  • fn with_frame_interval(self, frame_interval: MediaTime) -> Self

    Related: MediaTime

    Sets the time since the previous frame. Passes that simulate exposure over time, such as motion blur, scale

    what changed since the previous frame by it.

  • fn view(&self) -> View

    Related: View

    Returns the camera or light view used by this render target.

  • fn extent(&self) -> Extent

    Returns the pixel extent available to render passes for this sink.

  • fn exposure_scale(&self) -> f32

    Returns the camera exposure as a linear factor. Passes that write scene light multiply it in, so later passes

    and the tone mapper receive exposed light.

  • fn frame_interval(&self) -> MediaTime

    Related: MediaTime

    Returns the time since the previous frame, or zero when the sink was created without one, such as the

    first frame or a sink built for a test.

  • fn view_projection(&self) -> Matrix

    Returns the combined projection and view matrix for shader setup.

  • fn index(&self) -> usize

    Returns the renderer-local sink index.

Trait Implementations

impl ArchivePointee for Sink
  • type ArchivedMetadata = ()
  • fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for Sink
impl Clone for Sink
  • fn clone(&self) -> Sink

    Related: Sink

impl Copy for Sink
impl Debug for Sink
  • fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for Sink
  • 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 Sink
  • fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Instrument for Sink
impl LayoutRaw for Sink
  • fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for Sink
  • unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
  • fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for Sink
  • type Metadata = ()
impl Read for Sink
impl WithSubscriber for Sink

On this page