Type Alias MaterialResource

Source
pub type MaterialResource = Resource<Material>;
Expand description

Material resource is a material instance that can be used across multiple objects. It is useful when you need to have multiple objects that have the same material.

Material resource is also tells a renderer that this material can be used for efficient rendering - the renderer will be able to optimize rendering when it knows that multiple objects share the same material.

Aliased Type§

pub struct MaterialResource { /* private fields */ }

Trait Implementations§

Source§

impl MaterialResourceExtension for MaterialResource

Source§

fn new(material: Material) -> Self

Creates a new material resource. Read more
Source§

fn deep_copy(&self) -> MaterialResource

Creates a deep copy of the material resource.
Source§

fn deep_copy_as_embedded(&self) -> MaterialResource

Creates a deep copy of the material resource and marks it as procedural.