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]
impl PhongDeferredPipeline
[src]pub fn geometry_pass(
&mut self,
width: usize,
height: usize,
camera: &Camera,
geometries: &[&dyn PhongGeometry]
) -> Result<(), Error>
[src]
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]
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.