Skip to main content

DepthRenderableMaterial

Trait DepthRenderableMaterial 

Source
pub trait DepthRenderableMaterial: Material {
    const ALPHA_CUTOUT: Option<AlphaCutoutSpec>;
}
Expand description

Trait for all materials that can use the built-in shadow/prepass rendering.

When implementing this trait it is recommended to write a test using bytemuck::offset_of to validate your offsets are correct.

Required Associated Constants§

Source

const ALPHA_CUTOUT: Option<AlphaCutoutSpec>

If Some it is possible to do alpha cutouts

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§