Struct three_d::PhongDeferredPipeline[][src]

pub struct PhongDeferredPipeline {
    pub debug_type: DebugType,
    // some fields omitted
}
Expand description

Deferred pipeline based on the Phong reflection model supporting a performance-limited amount of directional, point and spot lights with shadows.

Fields

debug_type: DebugType
Expand description

Set this to visualize the positions, normals etc. for debug purposes.

Implementations

impl PhongDeferredPipeline[src]

pub fn new(context: &Context) -> Result<Self, Error>[src]

Constructor.

pub fn geometry_pass(
    &mut self,
    width: usize,
    height: usize,
    camera: &Camera,
    geometries: &[&dyn PhongGeometry]
) -> Result<(), Error>
[src]

Render the geometry and surface material parameters of the given Phong geometries. This function must not be called in a render target render function and needs to be followed by a call to light_pass which must be inside a render target render function.

pub fn light_pass(
    &mut self,
    viewport: Viewport,
    camera: &Camera,
    ambient_light: Option<&AmbientLight>,
    directional_lights: &[&DirectionalLight],
    spot_lights: &[&SpotLight],
    point_lights: &[&PointLight]
) -> Result<(), Error>
[src]

Uses the geometry and surface material parameters written in the last geometry_pass call and all of the given lights to shade the Phong geometries. Must be called in a render target render function, for example in the callback function of Screen::write.

pub fn geometry_pass_texture(&self) -> &ColorTargetTexture2DArray<u8>[src]

pub fn geometry_pass_depth_texture_array(&self) -> &DepthTargetTexture2DArray[src]

pub fn geometry_pass_depth_texture(&self) -> DepthTargetTexture2D[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.