pub struct LEDMaterial { /* private fields */ }
Expand description
Static led material.
It lets you add emission to material or make it like transparent like glass.
ยงExamples:
For the effect from the examples:
LEDMaterial::default();
You can specify your own color and emission intensity of cource:
LEDMaterial::new(Color::WHITE).with_emission(3.0);
Implementationsยง
Sourceยงimpl LEDMaterial
impl LEDMaterial
Trait Implementationsยง
Sourceยงimpl AsBindGroup for LEDMaterial
impl AsBindGroup for LEDMaterial
type Param = (Res<'static, RenderAssets<GpuImage>>, Res<'static, FallbackImage>, Res<'static, RenderAssets<GpuShaderStorageBuffer>>)
Sourceยงfn unprepared_bind_group(
&self,
layout: &BindGroupLayout,
render_device: &RenderDevice,
(images, fallback_image, storage_buffers): &mut SystemParamItem<'_, '_, Self::Param>,
) -> Result<UnpreparedBindGroup<Self::Data>, AsBindGroupError>
fn unprepared_bind_group( &self, layout: &BindGroupLayout, render_device: &RenderDevice, (images, fallback_image, storage_buffers): &mut SystemParamItem<'_, '_, Self::Param>, ) -> Result<UnpreparedBindGroup<Self::Data>, AsBindGroupError>
Returns a vec of (binding index,
OwnedBindingResource
).
In cases where OwnedBindingResource
is not available (as for bindless texture arrays currently),
an implementor may define as_bind_group
directly. This may prevent certain features
from working correctly.Sourceยงfn bind_group_layout_entries(
render_device: &RenderDevice,
) -> Vec<BindGroupLayoutEntry>
fn bind_group_layout_entries( render_device: &RenderDevice, ) -> Vec<BindGroupLayoutEntry>
Returns a vec of bind group layout entries
Sourceยงfn as_bind_group(
&self,
layout: &BindGroupLayout,
render_device: &RenderDevice,
param: &mut <Self::Param as SystemParam>::Item<'_, '_>,
) -> Result<PreparedBindGroup<Self::Data>, AsBindGroupError>
fn as_bind_group( &self, layout: &BindGroupLayout, render_device: &RenderDevice, param: &mut <Self::Param as SystemParam>::Item<'_, '_>, ) -> Result<PreparedBindGroup<Self::Data>, AsBindGroupError>
Creates a bind group for
self
matching the layout defined in AsBindGroup::bind_group_layout
.Sourceยงfn bind_group_layout(render_device: &RenderDevice) -> BindGroupLayoutwhere
Self: Sized,
fn bind_group_layout(render_device: &RenderDevice) -> BindGroupLayoutwhere
Self: Sized,
Creates the bind group layout matching all bind groups returned by
AsBindGroup::as_bind_group
Sourceยงimpl Clone for LEDMaterial
impl Clone for LEDMaterial
Sourceยงfn clone(&self) -> LEDMaterial
fn clone(&self) -> LEDMaterial
Returns a duplicate of the value. Read more
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSourceยงimpl Default for LEDMaterial
impl Default for LEDMaterial
Sourceยงimpl Material for LEDMaterial
impl Material for LEDMaterial
Sourceยงfn fragment_shader() -> ShaderRef
fn fragment_shader() -> ShaderRef
Returns this materialโs fragment shader. If
ShaderRef::Default
is returned, the default mesh fragment shader
will be used.Sourceยงfn alpha_mode(&self) -> AlphaMode
fn alpha_mode(&self) -> AlphaMode
Returns this materialโs
AlphaMode
. Defaults to AlphaMode::Opaque
.Sourceยงfn vertex_shader() -> ShaderRef
fn vertex_shader() -> ShaderRef
Returns this materialโs vertex shader. If
ShaderRef::Default
is returned, the default mesh vertex shader
will be used.Sourceยงfn opaque_render_method(&self) -> OpaqueRendererMethod
fn opaque_render_method(&self) -> OpaqueRendererMethod
Returns if this material should be rendered by the deferred or forward renderer.
for
AlphaMode::Opaque
or AlphaMode::Mask
materials.
If OpaqueRendererMethod::Auto
, it will default to what is selected in the DefaultOpaqueRendererMethod
resource.Sourceยงfn depth_bias(&self) -> f32
fn depth_bias(&self) -> f32
Add a bias to the view depth of the mesh which can be used to force a specific render order.
for meshes with similar depth, to avoid z-fighting.
The bias is in depth-texture units so large values may be needed to overcome small depth differences.
Sourceยงfn reads_view_transmission_texture(&self) -> bool
fn reads_view_transmission_texture(&self) -> bool
Returns whether the material would like to read from
ViewTransmissionTexture
. Read moreSourceยงfn prepass_vertex_shader() -> ShaderRef
fn prepass_vertex_shader() -> ShaderRef
Returns this materialโs prepass vertex shader. If
ShaderRef::Default
is returned, the default prepass vertex shader
will be used. Read moreSourceยงfn prepass_fragment_shader() -> ShaderRef
fn prepass_fragment_shader() -> ShaderRef
Returns this materialโs prepass fragment shader. If
ShaderRef::Default
is returned, the default prepass fragment shader
will be used. Read moreSourceยงfn deferred_vertex_shader() -> ShaderRef
fn deferred_vertex_shader() -> ShaderRef
Returns this materialโs deferred vertex shader. If
ShaderRef::Default
is returned, the default deferred vertex shader
will be used.Sourceยงfn deferred_fragment_shader() -> ShaderRef
fn deferred_fragment_shader() -> ShaderRef
Returns this materialโs deferred fragment shader. If
ShaderRef::Default
is returned, the default deferred fragment shader
will be used.Sourceยงfn specialize(
pipeline: &MaterialPipeline<Self>,
descriptor: &mut RenderPipelineDescriptor,
layout: &MeshVertexBufferLayoutRef,
key: MaterialPipelineKey<Self>,
) -> Result<(), SpecializedMeshPipelineError>
fn specialize( pipeline: &MaterialPipeline<Self>, descriptor: &mut RenderPipelineDescriptor, layout: &MeshVertexBufferLayoutRef, key: MaterialPipelineKey<Self>, ) -> Result<(), SpecializedMeshPipelineError>
Customizes the default
RenderPipelineDescriptor
for a specific entity using the entityโs
MaterialPipelineKey
and MeshVertexBufferLayoutRef
as input.Sourceยงimpl TypePath for LEDMaterial
impl TypePath for LEDMaterial
Sourceยงfn type_path() -> &'static str
fn type_path() -> &'static str
Returns the fully qualified path of the underlying type. Read more
Sourceยงfn short_type_path() -> &'static str
fn short_type_path() -> &'static str
Returns a short, pretty-print enabled path to the type. Read more
Sourceยงfn type_ident() -> Option<&'static str>
fn type_ident() -> Option<&'static str>
Sourceยงfn crate_name() -> Option<&'static str>
fn crate_name() -> Option<&'static str>
Sourceยงimpl VisitAssetDependencies for LEDMaterial
impl VisitAssetDependencies for LEDMaterial
fn visit_dependencies(&self, visit: &mut impl FnMut(UntypedAssetId))
impl Asset for LEDMaterial
Auto Trait Implementationsยง
impl Freeze for LEDMaterial
impl RefUnwindSafe for LEDMaterial
impl Send for LEDMaterial
impl Sync for LEDMaterial
impl Unpin for LEDMaterial
impl UnwindSafe for LEDMaterial
Blanket Implementationsยง
Sourceยงimpl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Sourceยงfn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
Return the
T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist.Sourceยงimpl<A> AssetContainer for Awhere
A: Asset,
impl<A> AssetContainer for Awhere
A: Asset,
fn insert(self: Box<A>, id: UntypedAssetId, world: &mut World)
fn asset_type_name(&self) -> &'static str
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Sourceยงfn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Sourceยงfn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Sourceยงfn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
โs vtable from &Trait
โs.Sourceยงfn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
โs vtable from &mut Trait
โs.Sourceยงimpl<T> DowncastSync for T
impl<T> DowncastSync for T
Sourceยงimpl<T> DynamicTypePath for Twhere
T: TypePath,
impl<T> DynamicTypePath for Twhere
T: TypePath,
Sourceยงfn reflect_type_path(&self) -> &str
fn reflect_type_path(&self) -> &str
See
TypePath::type_path
.Sourceยงfn reflect_short_type_path(&self) -> &str
fn reflect_short_type_path(&self) -> &str
Sourceยงfn reflect_type_ident(&self) -> Option<&str>
fn reflect_type_ident(&self) -> Option<&str>
See
TypePath::type_ident
.Sourceยงfn reflect_crate_name(&self) -> Option<&str>
fn reflect_crate_name(&self) -> Option<&str>
See
TypePath::crate_name
.Sourceยงfn reflect_module_path(&self) -> Option<&str>
fn reflect_module_path(&self) -> Option<&str>
Sourceยงimpl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Sourceยงimpl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Sourceยงfn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self
using default()
.
Sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
Sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Sourceยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more