pub struct DeferredPipeline {
    pub debug_type: DebugType,
    /* private fields */
}
Expand description

Deferred render pipeline which can render objects (implementing the Geometry trait) with a DeferredPhysicalMaterial and lighting. Deferred rendering draws the geometry information into a buffer in the DeferredPipeline::render_pass and use that information in the DeferredPipeline::lighting_pass. This means that the lighting is only calculated once per pixel since the depth testing is happening in the render pass. For now only supports a cook-torrance LightingModel. Note: Deferred rendering does not support blending and therefore does not support transparency!

Fields

debug_type: DebugType

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

Implementations

Constructor.

Render the given geometry and material parameters to a buffer. This function must not be called in a render target render function and needs to be followed by a call to DeferredPipeline::lighting_pass.

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

Returns the geometry pass texture

Returns the geometry pass depth texture

Returns the geometry pass depth texture

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more