doc: doc rendertarget

This commit is contained in:
chyyran 2023-02-08 03:41:44 -05:00
parent 44b2a797b4
commit beef0960f3

View file

@ -3,14 +3,19 @@ use librashader_common::Viewport;
use num_traits::{zero, AsPrimitive, Num}; use num_traits::{zero, AsPrimitive, Num};
use std::borrow::Borrow; use std::borrow::Borrow;
/// An internal render target to which pass colour attachments are made.
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct RenderTarget<'a, T, C = f32> pub struct RenderTarget<'a, T, C = f32>
where where
C: Num, C: Num,
{ {
pub mvp: &'a [f32; 16], /// The x-coordinate of the viewport to render to.
pub x: C, pub x: C,
/// The y-coordinate of the viewport to render to.
pub y: C, pub y: C,
/// The MVP to pass to the shader for this render pass.
pub mvp: &'a [f32; 16],
/// The output surface for the pass.
pub output: &'a T, pub output: &'a T,
} }