Struct three_d::PhongDeferredPipeline [−][src]
Deferred pipeline based on the Phong reflection model supporting a performance-limited amount of directional, point and spot lights with shadows. Supports colored, textured and instanced meshes.
Fields
debug_type: DebugType
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<F: FnOnce() -> Result<(), Error>>(
&mut self,
width: usize,
height: usize,
render: F
) -> Result<(), Error>
[src]
&mut self,
width: usize,
height: usize,
render: F
) -> Result<(), Error>
Render the geometry and surface material parameters of Phong deferred meshes or instanced meshes by calling the render_geometry on either type of mesh inside the render closure. This function must not be called in a render target render function, but 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]
&mut self,
viewport: Viewport,
camera: &Camera,
ambient_light: Option<&AmbientLight>,
directional_lights: &[&DirectionalLight],
spot_lights: &[&SpotLight],
point_lights: &[&PointLight]
) -> Result<(), Error>
Uses the geometry and surface material parameters written in the last geometry_pass call and all of the given lights to shade the Phong deferred meshes or instanced meshes. Must be called in a render target render function, for example in the callback function of Screen::write.
pub fn geometry_pass_texture(&self) -> &dyn Texture
[src]
pub fn geometry_pass_depth_texture_array(&self) -> &dyn Texture
[src]
pub fn geometry_pass_depth_texture(&self) -> DepthTargetTexture2D
[src]
Auto Trait Implementations
impl !RefUnwindSafe for PhongDeferredPipeline
impl !Send for PhongDeferredPipeline
impl !Sync for PhongDeferredPipeline
impl Unpin for PhongDeferredPipeline
impl UnwindSafe for PhongDeferredPipeline
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,