pub struct StandardMaterial {Show 60 fields
pub base_color: Color,
pub base_color_channel: UvChannel,
pub base_color_texture: Option<Handle<Image>>,
pub emissive: LinearRgba,
pub emissive_exposure_weight: f32,
pub emissive_channel: UvChannel,
pub emissive_texture: Option<Handle<Image>>,
pub perceptual_roughness: f32,
pub metallic: f32,
pub metallic_roughness_channel: UvChannel,
pub metallic_roughness_texture: Option<Handle<Image>>,
pub reflectance: f32,
pub specular_tint: Color,
pub diffuse_transmission: f32,
pub diffuse_transmission_channel: UvChannel,
pub diffuse_transmission_texture: Option<Handle<Image>>,
pub specular_transmission: f32,
pub specular_transmission_channel: UvChannel,
pub specular_transmission_texture: Option<Handle<Image>>,
pub thickness: f32,
pub thickness_channel: UvChannel,
pub thickness_texture: Option<Handle<Image>>,
pub ior: f32,
pub attenuation_distance: f32,
pub attenuation_color: Color,
pub normal_map_channel: UvChannel,
pub normal_map_texture: Option<Handle<Image>>,
pub flip_normal_map_y: bool,
pub occlusion_channel: UvChannel,
pub occlusion_texture: Option<Handle<Image>>,
pub specular_channel: UvChannel,
pub specular_texture: Option<Handle<Image>>,
pub specular_tint_channel: UvChannel,
pub specular_tint_texture: Option<Handle<Image>>,
pub clearcoat: f32,
pub clearcoat_channel: UvChannel,
pub clearcoat_texture: Option<Handle<Image>>,
pub clearcoat_perceptual_roughness: f32,
pub clearcoat_roughness_channel: UvChannel,
pub clearcoat_roughness_texture: Option<Handle<Image>>,
pub clearcoat_normal_channel: UvChannel,
pub clearcoat_normal_texture: Option<Handle<Image>>,
pub anisotropy_strength: f32,
pub anisotropy_rotation: f32,
pub anisotropy_channel: UvChannel,
pub anisotropy_texture: Option<Handle<Image>>,
pub double_sided: bool,
pub cull_mode: Option<Face>,
pub unlit: bool,
pub fog_enabled: bool,
pub alpha_mode: AlphaMode,
pub depth_bias: f32,
pub depth_map: Option<Handle<Image>>,
pub parallax_depth_scale: f32,
pub parallax_mapping_method: ParallaxMappingMethod,
pub max_parallax_layer_count: f32,
pub lightmap_exposure: f32,
pub opaque_render_method: OpaqueRendererMethod,
pub deferred_lighting_pass_id: u8,
pub uv_transform: Affine2,
}
Expand description
A material with “standard” properties used in PBR lighting. Standard property values with pictures here: https://google.github.io/filament/notes/material_properties.html.
Fields§
§base_color: Color
The color of the surface of the material before lighting.
Doubles as diffuse albedo for non-metallic, specular for metallic and a mix for everything
in between. If used together with a base_color_texture
, this is factored into the final
base color as base_color * base_color_texture_value
.
Defaults to Color::WHITE
.
base_color_channel: UvChannel
The UV channel to use for the StandardMaterial::base_color_texture
.
Defaults to UvChannel::Uv0
.
base_color_texture: Option<Handle<Image>>
The texture component of the material’s color before lighting.
The actual pre-lighting color is base_color * this_texture
.
See base_color
for details.
You should set base_color
to Color::WHITE
(the default)
if you want the texture to show as-is.
Setting base_color
to something else than white will tint
the texture. For example, setting base_color
to pure red will
tint the texture red.
emissive: LinearRgba
Color the material “emits” to the camera.
This is typically used for monitor screens or LED lights. Anything that can be visible even in darkness.
The emissive color is added to what would otherwise be the material’s visible color. This means that for a light emissive value, in darkness, you will mostly see the emissive component.
The default emissive color is LinearRgba::BLACK
, which doesn’t add anything to the material color.
Emissive strength is controlled by the value of the color channels, while the hue is controlled by their relative values.
As a result, channel values for emissive
colors can exceed 1.0
. For instance, a base_color
of
LinearRgba::rgb(1.0, 0.0, 0.0)
represents the brightest
red for objects that reflect light, but an emissive color
like LinearRgba::rgb(1000.0, 0.0, 0.0)
can be used to create
intensely bright red emissive effects.
This results in a final luminance value when multiplied by the value of the greyscale emissive texture (which ranges from 0 for black to 1 for white). Luminance is a measure of the amount of light emitted per unit area, and can be thought of as the “brightness” of the effect. In Bevy, we treat these luminance values as the physical units of cd/m², aka nits.
Increasing the emissive strength of the color will impact visual effects like bloom, but it’s important to note that an emissive material won’t typically light up surrounding areas like a light source, it just adds a value to the color seen on screen.
emissive_exposure_weight: f32
The weight in which the camera exposure influences the emissive color.
A value of 0.0
means the emissive color is not affected by the camera exposure.
In opposition, a value of 1.0
means the emissive color is multiplied by the camera exposure.
Defaults to 0.0
emissive_channel: UvChannel
The UV channel to use for the StandardMaterial::emissive_texture
.
Defaults to UvChannel::Uv0
.
emissive_texture: Option<Handle<Image>>
The emissive map, multiplies pixels with emissive
to get the final “emitting” color of a surface.
This color is multiplied by emissive
to get the final emitted color.
Meaning that you should set emissive
to Color::WHITE
if you want to use the full range of color of the emissive texture.
perceptual_roughness: f32
Linear perceptual roughness, clamped to [0.089, 1.0]
in the shader.
Defaults to 0.5
.
Low values result in a “glossy” material with specular highlights,
while values close to 1
result in rough materials.
If used together with a roughness/metallic texture, this is factored into the final base
color as roughness * roughness_texture_value
.
0.089 is the minimum floating point value that won’t be rounded down to 0 in the calculations used.
metallic: f32
How “metallic” the material appears, within [0.0, 1.0]
.
This should be set to 0.0 for dielectric materials or 1.0 for metallic materials. For a hybrid surface such as corroded metal, you may need to use in-between values.
Defaults to 0.00
, for dielectric.
If used together with a roughness/metallic texture, this is factored into the final base
color as metallic * metallic_texture_value
.
metallic_roughness_channel: UvChannel
The UV channel to use for the StandardMaterial::metallic_roughness_texture
.
Defaults to UvChannel::Uv0
.
metallic_roughness_texture: Option<Handle<Image>>
Metallic and roughness maps, stored as a single texture.
The blue channel contains metallic values, and the green channel contains the roughness values. Other channels are unused.
Those values are multiplied by the scalar ones of the material,
see metallic
and perceptual_roughness
for details.
Note that with the default values of metallic
and perceptual_roughness
,
setting this texture has no effect. If you want to exclusively use the
metallic_roughness_texture
values for your material, make sure to set metallic
and perceptual_roughness
to 1.0
.
reflectance: f32
Specular intensity for non-metals on a linear scale of [0.0, 1.0]
.
Use the value as a way to control the intensity of the specular highlight of the material, i.e. how reflective is the material, rather than the physical property “reflectance.”
Set to 0.0
, no specular highlight is visible, the highlight is strongest
when reflectance
is set to 1.0
.
Defaults to 0.5
which is mapped to 4% reflectance in the shader.
specular_tint: Color
A color with which to modulate the StandardMaterial::reflectance
for
non-metals.
The specular highlights and reflection are tinted with this color. Note that it has no effect for non-metals.
This feature is currently unsupported in the deferred rendering path, in order to reduce the size of the geometry buffers.
Defaults to Color::WHITE
.
diffuse_transmission: f32
The amount of light transmitted diffusely through the material (i.e. “translucency”).
Implemented as a second, flipped Lambertian diffuse lobe, which provides an inexpensive but plausible approximation of translucency for thin dielectric objects (e.g. paper, leaves, some fabrics) or thicker volumetric materials with short scattering distances (e.g. porcelain, wax).
For specular transmission usecases with refraction (e.g. glass) use the StandardMaterial::specular_transmission
and
StandardMaterial::ior
properties instead.
- When set to
0.0
(the default) no diffuse light is transmitted; - When set to
1.0
all diffuse light is transmitted through the material; - Values higher than
0.5
will cause more diffuse light to be transmitted than reflected, resulting in a “darker” appearance on the side facing the light than the opposite side. (e.g. plant leaves)
§Notes
- The material’s
StandardMaterial::base_color
also modulates the transmitted light; - To receive transmitted shadows on the diffuse transmission lobe (i.e. the “backside”) of the material,
use the
TransmittedShadowReceiver
component.
diffuse_transmission_channel: UvChannel
The UV channel to use for the StandardMaterial::diffuse_transmission_texture
.
Defaults to UvChannel::Uv0
.
diffuse_transmission_texture: Option<Handle<Image>>
A map that modulates diffuse transmission via its alpha channel. Multiplied by StandardMaterial::diffuse_transmission
to obtain the final result.
Important: The StandardMaterial::diffuse_transmission
property must be set to a value higher than 0.0,
or this texture won’t have any effect.
specular_transmission: f32
The amount of light transmitted specularly through the material (i.e. via refraction).
- When set to
0.0
(the default) no light is transmitted. - When set to
1.0
all light is transmitted through the material.
The material’s StandardMaterial::base_color
also modulates the transmitted light.
Note: Typically used in conjunction with StandardMaterial::thickness
, StandardMaterial::ior
and StandardMaterial::perceptual_roughness
.
§Performance
Specular transmission is implemented as a relatively expensive screen-space effect that allows occluded objects to be seen through the material, with distortion and blur effects.
Camera3d::screen_space_specular_transmission_steps
can be used to enable transmissive objects to be seen through other transmissive objects, at the cost of additional draw calls and texture copies; (Use with caution!)- If a simplified approximation of specular transmission using only environment map lighting is sufficient, consider setting
Camera3d::screen_space_specular_transmission_steps
to0
.
- If a simplified approximation of specular transmission using only environment map lighting is sufficient, consider setting
- If purely diffuse light transmission is needed, (i.e. “translucency”) consider using
StandardMaterial::diffuse_transmission
instead, for a much less expensive effect. - Specular transmission is rendered before alpha blending, so any material with
AlphaMode::Blend
,AlphaMode::Premultiplied
,AlphaMode::Add
orAlphaMode::Multiply
won’t be visible through specular transmissive materials.
specular_transmission_channel: UvChannel
The UV channel to use for the StandardMaterial::specular_transmission_texture
.
Defaults to UvChannel::Uv0
.
specular_transmission_texture: Option<Handle<Image>>
A map that modulates specular transmission via its red channel. Multiplied by StandardMaterial::specular_transmission
to obtain the final result.
Important: The StandardMaterial::specular_transmission
property must be set to a value higher than 0.0,
or this texture won’t have any effect.
thickness: f32
Thickness of the volume beneath the material surface.
When set to 0.0
(the default) the material appears as an infinitely-thin film,
transmitting light without distorting it.
When set to any other value, the material distorts light like a thick lens.
Note: Typically used in conjunction with StandardMaterial::specular_transmission
and StandardMaterial::ior
, or with
StandardMaterial::diffuse_transmission
.
thickness_channel: UvChannel
The UV channel to use for the StandardMaterial::thickness_texture
.
Defaults to UvChannel::Uv0
.
thickness_texture: Option<Handle<Image>>
A map that modulates thickness via its green channel. Multiplied by StandardMaterial::thickness
to obtain the final result.
Important: The StandardMaterial::thickness
property must be set to a value higher than 0.0,
or this texture won’t have any effect.
ior: f32
The index of refraction of the material.
Defaults to 1.5.
Material | Index of Refraction |
---|---|
Vacuum | 1 |
Air | 1.00 |
Ice | 1.31 |
Water | 1.33 |
Eyes | 1.38 |
Quartz | 1.46 |
Olive Oil | 1.47 |
Honey | 1.49 |
Acrylic | 1.49 |
Window Glass | 1.52 |
Polycarbonate | 1.58 |
Flint Glass | 1.69 |
Ruby | 1.71 |
Glycerine | 1.74 |
Sapphire | 1.77 |
Cubic Zirconia | 2.15 |
Diamond | 2.42 |
Moissanite | 2.65 |
Note: Typically used in conjunction with StandardMaterial::specular_transmission
and StandardMaterial::thickness
.
attenuation_distance: f32
How far, on average, light travels through the volume beneath the material’s surface before being absorbed.
Defaults to f32::INFINITY
, i.e. light is never absorbed.
Note: To have any effect, must be used in conjunction with:
attenuation_color: Color
The resulting (non-absorbed) color after white light travels through the attenuation distance.
Defaults to Color::WHITE
, i.e. no change.
Note: To have any effect, must be used in conjunction with:
normal_map_channel: UvChannel
The UV channel to use for the StandardMaterial::normal_map_texture
.
Defaults to UvChannel::Uv0
.
normal_map_texture: Option<Handle<Image>>
Used to fake the lighting of bumps and dents on a material.
A typical usage would be faking cobblestones on a flat plane mesh in 3D.
§Notes
Normal mapping with StandardMaterial
and the core bevy PBR shaders requires:
- A normal map texture
- Vertex UVs
- Vertex tangents
- Vertex normals
Tangents do not have to be stored in your model,
they can be generated using the Mesh::generate_tangents
or
Mesh::with_generated_tangents
methods.
If your material has a normal map, but still renders as a flat surface,
make sure your meshes have their tangents set.
§Usage
fn load_normal_map(asset_server: Res<AssetServer>) {
let normal_handle: Handle<Image> = asset_server.load_with_settings(
"textures/parallax_example/cube_normal.png",
// The normal map texture is in linear color space. Lighting won't look correct
// if `is_srgb` is `true`, which is the default.
|settings: &mut ImageLoaderSettings| settings.is_srgb = false,
);
}
flip_normal_map_y: bool
Normal map textures authored for DirectX have their y-component flipped. Set this to flip it to right-handed conventions.
occlusion_channel: UvChannel
The UV channel to use for the StandardMaterial::occlusion_texture
.
Defaults to UvChannel::Uv0
.
occlusion_texture: Option<Handle<Image>>
Specifies the level of exposure to ambient light.
This is usually generated and stored automatically (“baked”) by 3D-modeling software.
Typically, steep concave parts of a model (such as the armpit of a shirt) are darker, because they have little exposure to light. An occlusion map specifies those parts of the model that light doesn’t reach well.
The material will be less lit in places where this texture is dark. This is similar to ambient occlusion, but built into the model.
specular_channel: UvChannel
The UV channel to use for the StandardMaterial::specular_texture
.
Defaults to UvChannel::Uv0
.
specular_texture: Option<Handle<Image>>
A map that specifies reflectance for non-metallic materials.
Alpha values from [0.0, 1.0] in this texture are linearly mapped to
reflectance values of [0.0, 0.5] and multiplied by the constant
StandardMaterial::reflectance
value. This follows the
KHR_materials_specular
specification. The map will have no effect if
the material is fully metallic.
When using this map, you may wish to set the
StandardMaterial::reflectance
value to 2.0 so that this map can
express the full [0.0, 1.0] range of values.
Note that, because the reflectance is stored in the alpha channel, and
the StandardMaterial::specular_tint_texture
has no alpha value, it
may be desirable to pack the values together and supply the same
texture to both fields.
specular_tint_channel: UvChannel
The UV channel to use for the
StandardMaterial::specular_tint_texture
.
Defaults to UvChannel::Uv0
.
specular_tint_texture: Option<Handle<Image>>
A map that specifies color adjustment to be applied to the specular reflection for non-metallic materials.
The RGB values of this texture modulate the
StandardMaterial::specular_tint
value. See the documentation for
that field for more information.
Like the fixed specular tint value, this texture map isn’t supported in the deferred renderer.
clearcoat: f32
An extra thin translucent layer on top of the main PBR layer. This is typically used for painted surfaces.
This value specifies the strength of the layer, which affects how visible the clearcoat layer will be.
Defaults to zero, specifying no clearcoat layer.
clearcoat_channel: UvChannel
The UV channel to use for the StandardMaterial::clearcoat_texture
.
Defaults to UvChannel::Uv0
.
clearcoat_texture: Option<Handle<Image>>
An image texture that specifies the strength of the clearcoat layer in
the red channel. Values sampled from this texture are multiplied by the
main StandardMaterial::clearcoat
factor.
As this is a non-color map, it must not be loaded as sRGB.
clearcoat_perceptual_roughness: f32
The roughness of the clearcoat material. This is specified in exactly
the same way as the StandardMaterial::perceptual_roughness
.
If the StandardMaterial::clearcoat
value if zero, this has no
effect.
Defaults to 0.5.
clearcoat_roughness_channel: UvChannel
The UV channel to use for the StandardMaterial::clearcoat_roughness_texture
.
Defaults to UvChannel::Uv0
.
clearcoat_roughness_texture: Option<Handle<Image>>
An image texture that specifies the roughness of the clearcoat level in
the green channel. Values from this texture are multiplied by the main
StandardMaterial::clearcoat_perceptual_roughness
factor.
As this is a non-color map, it must not be loaded as sRGB.
clearcoat_normal_channel: UvChannel
The UV channel to use for the StandardMaterial::clearcoat_normal_texture
.
Defaults to UvChannel::Uv0
.
clearcoat_normal_texture: Option<Handle<Image>>
An image texture that specifies a normal map that is to be applied to
the clearcoat layer. This can be used to simulate, for example,
scratches on an outer layer of varnish. Normal maps are in the same
format as StandardMaterial::normal_map_texture
.
Note that, if a clearcoat normal map isn’t specified, the main normal
map, if any, won’t be applied to the clearcoat. If you want a normal map
that applies to both the main material and to the clearcoat, specify it
in both StandardMaterial::normal_map_texture
and this field.
As this is a non-color map, it must not be loaded as sRGB.
anisotropy_strength: f32
Increases the roughness along a specific direction, so that the specular highlight will be stretched instead of being a circular lobe.
This value ranges from 0 (perfectly circular) to 1 (maximally
stretched). The default direction (corresponding to a
StandardMaterial::anisotropy_rotation
of 0) aligns with the
tangent of the mesh; thus mesh tangents must be specified in order for
this parameter to have any meaning. The direction can be changed using
the StandardMaterial::anisotropy_rotation
parameter.
This is typically used for modeling surfaces such as brushed metal and hair, in which one direction of the surface but not the other is smooth.
See the KHR_materials_anisotropy
specification for more details.
anisotropy_rotation: f32
The direction of increased roughness, in radians relative to the mesh tangent.
This parameter causes the roughness to vary according to the
StandardMaterial::anisotropy_strength
. The rotation is applied in
tangent-bitangent space; thus, mesh tangents must be present for this
parameter to have any meaning.
This parameter has no effect if
StandardMaterial::anisotropy_strength
is zero. Its value can
optionally be adjusted across the mesh with the
StandardMaterial::anisotropy_texture
.
See the KHR_materials_anisotropy
specification for more details.
anisotropy_channel: UvChannel
The UV channel to use for the StandardMaterial::anisotropy_texture
.
Defaults to UvChannel::Uv0
.
anisotropy_texture: Option<Handle<Image>>
An image texture that allows the
StandardMaterial::anisotropy_strength
and
StandardMaterial::anisotropy_rotation
to vary across the mesh.
The KHR_materials_anisotropy
specification defines the format that
this texture must take. To summarize: the direction vector is encoded in
the red and green channels, while the strength is encoded in the blue
channels. For the direction vector, the red and green channels map the
color range [0, 1] to the vector range [-1, 1]. The direction vector
encoded in this texture modifies the default rotation direction in
tangent-bitangent space, before the
StandardMaterial::anisotropy_rotation
parameter is applied. The
value in the blue channel is multiplied by the
StandardMaterial::anisotropy_strength
value to produce the final
anisotropy strength.
As the texel values don’t represent colors, this texture must be in linear color space, not sRGB.
double_sided: bool
Support two-sided lighting by automatically flipping the normals for “back” faces within the PBR lighting shader.
Defaults to false
.
This does not automatically configure backface culling,
which can be done via cull_mode
.
cull_mode: Option<Face>
Whether to cull the “front”, “back” or neither side of a mesh.
If set to None
, the two sides of the mesh are visible.
Defaults to Some(Face::Back)
.
In bevy, the order of declaration of a triangle’s vertices
in Mesh
defines the triangle’s front face.
When a triangle is in a viewport, if its vertices appear counter-clockwise from the viewport’s perspective, then the viewport is seeing the triangle’s front face. Conversely, if the vertices appear clockwise, you are seeing the back face.
In short, in bevy, front faces winds counter-clockwise.
Your 3D editing software should manage all of that.
unlit: bool
Whether to apply only the base color to this material.
Normals, occlusion textures, roughness, metallic, reflectance, emissive,
shadows, alpha mode and ambient light are ignored if this is set to true
.
fog_enabled: bool
Whether to enable fog for this material.
alpha_mode: AlphaMode
How to apply the alpha channel of the base_color_texture
.
See AlphaMode
for details. Defaults to AlphaMode::Opaque
.
depth_bias: f32
Adjust rendered depth.
A material with a positive depth bias will render closer to the camera while negative values cause the material to render behind other objects. This is independent of the viewport.
depth_bias
affects render ordering and depth write operations
using the wgpu::DepthBiasState::Constant
field.
depth_map: Option<Handle<Image>>
The depth map used for parallax mapping.
It is a grayscale image where white represents bottom and black the top. If this field is set, bevy will apply parallax mapping. Parallax mapping, unlike simple normal maps, will move the texture coordinate according to the current perspective, giving actual depth to the texture.
The visual result is similar to a displacement map, but does not require additional geometry.
Use the parallax_depth_scale
field to control the depth of the parallax.
§Limitations
- It will look weird on bent/non-planar surfaces.
- The depth of the pixel does not reflect its visual position, resulting in artifacts for depth-dependent features such as fog or SSAO.
- For the same reason, the geometry silhouette will always be the one of the actual geometry, not the parallaxed version, resulting in awkward looks on intersecting parallaxed surfaces.
§Performance
Parallax mapping requires multiple texture lookups, proportional to
max_parallax_layer_count
, which might be costly.
Use the parallax_mapping_method
and max_parallax_layer_count
fields
to tweak the shader, trading graphical quality for performance.
To improve performance, set your depth_map
’s Image::sampler
filter mode to FilterMode::Nearest
, as this paper indicates, it improves
performance a bit.
To reduce artifacts, avoid steep changes in depth, blurring the depth map helps with this.
Larger depth maps haves a disproportionate performance impact.
parallax_depth_scale: f32
How deep the offset introduced by the depth map should be.
Default is 0.1
, anything over that value may look distorted.
Lower values lessen the effect.
The depth is relative to texture size. This means that if your texture
occupies a surface of 1
world unit, and parallax_depth_scale
is 0.1
, then
the in-world depth will be of 0.1
world units.
If the texture stretches for 10
world units, then the final depth
will be of 1
world unit.
parallax_mapping_method: ParallaxMappingMethod
Which parallax mapping method to use.
We recommend that all objects use the same ParallaxMappingMethod
, to avoid
duplicating and running two shaders.
max_parallax_layer_count: f32
In how many layers to split the depth maps for parallax mapping.
If you are seeing jaggy edges, increase this value. However, this incurs a performance cost.
Dependent on the situation, switching to ParallaxMappingMethod::Relief
and keeping this value low might have better performance than increasing the
layer count while using ParallaxMappingMethod::Occlusion
.
Default is 16.0
.
lightmap_exposure: f32
The exposure (brightness) level of the lightmap, if present.
opaque_render_method: OpaqueRendererMethod
Render method used for opaque materials. (Where alpha_mode
is AlphaMode::Opaque
or AlphaMode::Mask
)
deferred_lighting_pass_id: u8
Used for selecting the deferred lighting pass for deferred materials.
Default is DEFAULT_PBR_DEFERRED_LIGHTING_PASS_ID
for default
PBR deferred lighting pass. Ignored in the case of forward materials.
uv_transform: Affine2
The transform applied to the UVs corresponding to ATTRIBUTE_UV_0
on the mesh before sampling. Default is identity.
Implementations§
Source§impl StandardMaterial
impl StandardMaterial
Sourcepub const FLIP_HORIZONTAL: Affine2
pub const FLIP_HORIZONTAL: Affine2
Horizontal flipping transform
Multiplying this with another Affine2 returns transformation with horizontally flipped texture coords
Sourcepub const FLIP_VERTICAL: Affine2
pub const FLIP_VERTICAL: Affine2
Vertical flipping transform
Multiplying this with another Affine2 returns transformation with vertically flipped texture coords
Sourcepub const FLIP_X: Affine3
pub const FLIP_X: Affine3
Flipping X 3D transform
Multiplying this with another Affine3 returns transformation with flipped X coords
Sourcepub const FLIP_Y: Affine3
pub const FLIP_Y: Affine3
Flipping Y 3D transform
Multiplying this with another Affine3 returns transformation with flipped Y coords
Sourcepub const FLIP_Z: Affine3
pub const FLIP_Z: Affine3
Flipping Z 3D transform
Multiplying this with another Affine3 returns transformation with flipped Z coords
Sourcepub fn flip(&mut self, horizontal: bool, vertical: bool)
pub fn flip(&mut self, horizontal: bool, vertical: bool)
Flip the texture coordinates of the material.
Sourcepub fn flipped(self, horizontal: bool, vertical: bool) -> StandardMaterial
pub fn flipped(self, horizontal: bool, vertical: bool) -> StandardMaterial
Consumes the material and returns a material with flipped texture coordinates
Sourcepub fn from_color(color: impl Into<Color>) -> StandardMaterial
pub fn from_color(color: impl Into<Color>) -> StandardMaterial
Creates a new material from a given color
Trait Implementations§
Source§impl AsBindGroup for StandardMaterial
impl AsBindGroup for StandardMaterial
Source§type Data = StandardMaterialKey
type Data = StandardMaterialKey
type Param = (Res<'static, RenderAssets<GpuImage>>, Res<'static, FallbackImage>, Res<'static, RenderAssets<GpuShaderStorageBuffer>>)
Source§fn bindless_slot_count() -> Option<BindlessSlabResourceLimit>
fn bindless_slot_count() -> Option<BindlessSlabResourceLimit>
Source§fn bindless_supported(render_device: &RenderDevice) -> bool
fn bindless_supported(render_device: &RenderDevice) -> bool
Source§fn unprepared_bind_group(
&self,
layout: &BindGroupLayout,
render_device: &RenderDevice,
_: &mut <<StandardMaterial as AsBindGroup>::Param as SystemParam>::Item<'_, '_>,
force_no_bindless: bool,
) -> Result<UnpreparedBindGroup, AsBindGroupError>
fn unprepared_bind_group( &self, layout: &BindGroupLayout, render_device: &RenderDevice, _: &mut <<StandardMaterial as AsBindGroup>::Param as SystemParam>::Item<'_, '_>, force_no_bindless: bool, ) -> Result<UnpreparedBindGroup, AsBindGroupError>
OwnedBindingResource
). Read morefn bind_group_data(&self) -> <StandardMaterial as AsBindGroup>::Data
Source§fn bind_group_layout_entries(
render_device: &RenderDevice,
force_no_bindless: bool,
) -> Vec<BindGroupLayoutEntry>
fn bind_group_layout_entries( render_device: &RenderDevice, force_no_bindless: bool, ) -> Vec<BindGroupLayoutEntry>
fn bindless_descriptor() -> Option<BindlessDescriptor>
Source§fn as_bind_group(
&self,
layout: &BindGroupLayout,
render_device: &RenderDevice,
param: &mut <Self::Param as SystemParam>::Item<'_, '_>,
) -> Result<PreparedBindGroup, AsBindGroupError>
fn as_bind_group( &self, layout: &BindGroupLayout, render_device: &RenderDevice, param: &mut <Self::Param as SystemParam>::Item<'_, '_>, ) -> Result<PreparedBindGroup, AsBindGroupError>
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,
AsBindGroup::as_bind_group
Source§impl AsBindGroupShaderType<StandardMaterialUniform> for StandardMaterial
impl AsBindGroupShaderType<StandardMaterialUniform> for StandardMaterial
Source§fn as_bind_group_shader_type(
&self,
images: &RenderAssets<GpuImage>,
) -> StandardMaterialUniform
fn as_bind_group_shader_type( &self, images: &RenderAssets<GpuImage>, ) -> StandardMaterialUniform
T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist.Source§impl Clone for StandardMaterial
impl Clone for StandardMaterial
Source§fn clone(&self) -> StandardMaterial
fn clone(&self) -> StandardMaterial
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for StandardMaterial
impl Debug for StandardMaterial
Source§impl Default for StandardMaterial
impl Default for StandardMaterial
Source§fn default() -> StandardMaterial
fn default() -> StandardMaterial
Source§impl From<&StandardMaterial> for StandardMaterialKey
impl From<&StandardMaterial> for StandardMaterialKey
Source§fn from(material: &StandardMaterial) -> StandardMaterialKey
fn from(material: &StandardMaterial) -> StandardMaterialKey
Source§impl From<Color> for StandardMaterial
impl From<Color> for StandardMaterial
Source§fn from(color: Color) -> StandardMaterial
fn from(color: Color) -> StandardMaterial
Source§impl FromArg for StandardMaterial
impl FromArg for StandardMaterial
Source§impl FromReflect for StandardMaterial
impl FromReflect for StandardMaterial
Source§fn from_reflect(
reflect: &(dyn PartialReflect + 'static),
) -> Option<StandardMaterial>
fn from_reflect( reflect: &(dyn PartialReflect + 'static), ) -> Option<StandardMaterial>
Self
from a reflected value.Source§fn take_from_reflect(
reflect: Box<dyn PartialReflect>,
) -> Result<Self, Box<dyn PartialReflect>>
fn take_from_reflect( reflect: Box<dyn PartialReflect>, ) -> Result<Self, Box<dyn PartialReflect>>
Self
using,
constructing the value using from_reflect
if that fails. Read moreSource§impl GetOwnership for StandardMaterial
impl GetOwnership for StandardMaterial
Source§impl GetTypeRegistration for StandardMaterial
impl GetTypeRegistration for StandardMaterial
Source§fn get_type_registration() -> TypeRegistration
fn get_type_registration() -> TypeRegistration
TypeRegistration
for this type.Source§fn register_type_dependencies(registry: &mut TypeRegistry)
fn register_type_dependencies(registry: &mut TypeRegistry)
Source§impl IntoReturn for StandardMaterial
impl IntoReturn for StandardMaterial
Source§fn into_return<'into_return>(self) -> Return<'into_return>where
StandardMaterial: 'into_return,
fn into_return<'into_return>(self) -> Return<'into_return>where
StandardMaterial: 'into_return,
Source§impl Material for StandardMaterial
impl Material for StandardMaterial
Source§fn fragment_shader() -> ShaderRef
fn fragment_shader() -> ShaderRef
ShaderRef::Default
is returned, the default mesh fragment shader
will be used.Source§fn alpha_mode(&self) -> AlphaMode
fn alpha_mode(&self) -> AlphaMode
AlphaMode
. Defaults to AlphaMode::Opaque
.Source§fn opaque_render_method(&self) -> OpaqueRendererMethod
fn opaque_render_method(&self) -> OpaqueRendererMethod
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
Source§fn reads_view_transmission_texture(&self) -> bool
fn reads_view_transmission_texture(&self) -> bool
ViewTransmissionTexture
. Read moreSource§fn prepass_fragment_shader() -> ShaderRef
fn prepass_fragment_shader() -> ShaderRef
ShaderRef::Default
is returned, the default prepass fragment shader
will be used. Read moreSource§fn deferred_fragment_shader() -> ShaderRef
fn deferred_fragment_shader() -> ShaderRef
ShaderRef::Default
is returned, the default deferred fragment shader
will be used.Source§fn meshlet_mesh_fragment_shader() -> ShaderRef
fn meshlet_mesh_fragment_shader() -> ShaderRef
crate::meshlet::MeshletMesh
fragment shader. If ShaderRef::Default
is returned,
the default meshlet mesh fragment shader will be used. Read moreSource§fn meshlet_mesh_prepass_fragment_shader() -> ShaderRef
fn meshlet_mesh_prepass_fragment_shader() -> ShaderRef
crate::meshlet::MeshletMesh
prepass fragment shader. If ShaderRef::Default
is returned,
the default meshlet mesh prepass fragment shader will be used. Read moreSource§fn meshlet_mesh_deferred_fragment_shader() -> ShaderRef
fn meshlet_mesh_deferred_fragment_shader() -> ShaderRef
crate::meshlet::MeshletMesh
deferred fragment shader. If ShaderRef::Default
is returned,
the default meshlet mesh deferred fragment shader will be used. Read moreSource§fn specialize(
_pipeline: &MaterialPipeline,
descriptor: &mut RenderPipelineDescriptor,
_layout: &MeshVertexBufferLayoutRef,
key: MaterialPipelineKey<StandardMaterial>,
) -> Result<(), SpecializedMeshPipelineError>
fn specialize( _pipeline: &MaterialPipeline, descriptor: &mut RenderPipelineDescriptor, _layout: &MeshVertexBufferLayoutRef, key: MaterialPipelineKey<StandardMaterial>, ) -> Result<(), SpecializedMeshPipelineError>
RenderPipelineDescriptor
for a specific entity using the entity’s
MaterialPipelineKey
and MeshVertexBufferLayoutRef
as input.Source§fn vertex_shader() -> ShaderRef
fn vertex_shader() -> ShaderRef
ShaderRef::Default
is returned, the default mesh vertex shader
will be used.Source§fn prepass_vertex_shader() -> ShaderRef
fn prepass_vertex_shader() -> ShaderRef
ShaderRef::Default
is returned, the default prepass vertex shader
will be used. Read moreSource§fn deferred_vertex_shader() -> ShaderRef
fn deferred_vertex_shader() -> ShaderRef
ShaderRef::Default
is returned, the default deferred vertex shader
will be used.Source§impl PartialReflect for StandardMaterial
impl PartialReflect for StandardMaterial
Source§fn get_represented_type_info(&self) -> Option<&'static TypeInfo>
fn get_represented_type_info(&self) -> Option<&'static TypeInfo>
Source§fn try_apply(
&mut self,
value: &(dyn PartialReflect + 'static),
) -> Result<(), ApplyError>
fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>
Source§fn reflect_kind(&self) -> ReflectKind
fn reflect_kind(&self) -> ReflectKind
Source§fn reflect_ref(&self) -> ReflectRef<'_>
fn reflect_ref(&self) -> ReflectRef<'_>
Source§fn reflect_mut(&mut self) -> ReflectMut<'_>
fn reflect_mut(&mut self) -> ReflectMut<'_>
Source§fn reflect_owned(self: Box<StandardMaterial>) -> ReflectOwned
fn reflect_owned(self: Box<StandardMaterial>) -> ReflectOwned
Source§fn try_into_reflect(
self: Box<StandardMaterial>,
) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>
fn try_into_reflect( self: Box<StandardMaterial>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>
Source§fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>
fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>
Source§fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>
fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>
Source§fn into_partial_reflect(self: Box<StandardMaterial>) -> Box<dyn PartialReflect>
fn into_partial_reflect(self: Box<StandardMaterial>) -> Box<dyn PartialReflect>
Source§fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)
fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)
Source§fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)
fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)
Source§fn reflect_partial_eq(
&self,
value: &(dyn PartialReflect + 'static),
) -> Option<bool>
fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>
Source§fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>
Source§fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>
fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>
Self
using reflection. Read moreSource§fn apply(&mut self, value: &(dyn PartialReflect + 'static))
fn apply(&mut self, value: &(dyn PartialReflect + 'static))
Source§fn to_dynamic(&self) -> Box<dyn PartialReflect>
fn to_dynamic(&self) -> Box<dyn PartialReflect>
Source§fn reflect_clone_and_take<T>(&self) -> Result<T, ReflectCloneError>
fn reflect_clone_and_take<T>(&self) -> Result<T, ReflectCloneError>
PartialReflect
, combines reflect_clone
and
take
in a useful fashion, automatically constructing an appropriate
ReflectCloneError
if the downcast fails. Read moreSource§fn reflect_hash(&self) -> Option<u64>
fn reflect_hash(&self) -> Option<u64>
Source§fn is_dynamic(&self) -> bool
fn is_dynamic(&self) -> bool
Source§impl Reflect for StandardMaterial
impl Reflect for StandardMaterial
Source§fn into_any(self: Box<StandardMaterial>) -> Box<dyn Any>
fn into_any(self: Box<StandardMaterial>) -> Box<dyn Any>
Box<dyn Any>
. Read moreSource§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut dyn Any
. Read moreSource§fn into_reflect(self: Box<StandardMaterial>) -> Box<dyn Reflect>
fn into_reflect(self: Box<StandardMaterial>) -> Box<dyn Reflect>
Source§fn as_reflect(&self) -> &(dyn Reflect + 'static)
fn as_reflect(&self) -> &(dyn Reflect + 'static)
Source§fn as_reflect_mut(&mut self) -> &mut (dyn Reflect + 'static)
fn as_reflect_mut(&mut self) -> &mut (dyn Reflect + 'static)
Source§impl Struct for StandardMaterial
impl Struct for StandardMaterial
Source§fn field(&self, name: &str) -> Option<&(dyn PartialReflect + 'static)>
fn field(&self, name: &str) -> Option<&(dyn PartialReflect + 'static)>
name
as a &dyn PartialReflect
.Source§fn field_mut(
&mut self,
name: &str,
) -> Option<&mut (dyn PartialReflect + 'static)>
fn field_mut( &mut self, name: &str, ) -> Option<&mut (dyn PartialReflect + 'static)>
name
as a
&mut dyn PartialReflect
.Source§fn field_at(&self, index: usize) -> Option<&(dyn PartialReflect + 'static)>
fn field_at(&self, index: usize) -> Option<&(dyn PartialReflect + 'static)>
index
as a
&dyn PartialReflect
.Source§fn field_at_mut(
&mut self,
index: usize,
) -> Option<&mut (dyn PartialReflect + 'static)>
fn field_at_mut( &mut self, index: usize, ) -> Option<&mut (dyn PartialReflect + 'static)>
index
as a &mut dyn PartialReflect
.Source§fn name_at(&self, index: usize) -> Option<&str>
fn name_at(&self, index: usize) -> Option<&str>
index
.Source§fn iter_fields(&self) -> FieldIter<'_> ⓘ
fn iter_fields(&self) -> FieldIter<'_> ⓘ
Source§fn to_dynamic_struct(&self) -> DynamicStruct
fn to_dynamic_struct(&self) -> DynamicStruct
DynamicStruct
from this struct.Source§fn get_represented_struct_info(&self) -> Option<&'static StructInfo>
fn get_represented_struct_info(&self) -> Option<&'static StructInfo>
None
if TypeInfo
is not available.Source§impl TypePath for StandardMaterial
impl TypePath for StandardMaterial
Source§fn type_path() -> &'static str
fn type_path() -> &'static str
Source§fn short_type_path() -> &'static str
fn short_type_path() -> &'static str
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 Typed for StandardMaterial
impl Typed for StandardMaterial
Source§impl VisitAssetDependencies for StandardMaterial
impl VisitAssetDependencies for StandardMaterial
fn visit_dependencies(&self, visit: &mut impl FnMut(UntypedAssetId))
impl Asset for StandardMaterial
Auto Trait Implementations§
impl Freeze for StandardMaterial
impl !RefUnwindSafe for StandardMaterial
impl Send for StandardMaterial
impl Sync for StandardMaterial
impl Unpin for StandardMaterial
impl !UnwindSafe for StandardMaterial
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
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
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>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn 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>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which 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)
&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)
&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> 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>
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>
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)
&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)
&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> DowncastSend for T
impl<T> DowncastSend for T
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
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>
TypePath::type_ident
.Source§fn reflect_crate_name(&self) -> Option<&str>
fn reflect_crate_name(&self) -> Option<&str>
TypePath::crate_name
.Source§fn reflect_module_path(&self) -> Option<&str>
fn reflect_module_path(&self) -> Option<&str>
Source§impl<T> DynamicTyped for Twhere
T: Typed,
impl<T> DynamicTyped for Twhere
T: Typed,
Source§fn reflect_type_info(&self) -> &'static TypeInfo
fn reflect_type_info(&self) -> &'static TypeInfo
Typed::type_info
.Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.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<S> GetField for Swhere
S: Struct,
impl<S> GetField for Swhere
S: Struct,
Source§impl<T> GetPath for T
impl<T> GetPath for T
Source§fn reflect_path<'p>(
&self,
path: impl ReflectPath<'p>,
) -> Result<&(dyn PartialReflect + 'static), ReflectPathError<'p>>
fn reflect_path<'p>( &self, path: impl ReflectPath<'p>, ) -> Result<&(dyn PartialReflect + 'static), ReflectPathError<'p>>
path
. Read moreSource§fn reflect_path_mut<'p>(
&mut self,
path: impl ReflectPath<'p>,
) -> Result<&mut (dyn PartialReflect + 'static), ReflectPathError<'p>>
fn reflect_path_mut<'p>( &mut self, path: impl ReflectPath<'p>, ) -> Result<&mut (dyn PartialReflect + 'static), ReflectPathError<'p>>
path
. Read moreSource§fn path<'p, T>(
&self,
path: impl ReflectPath<'p>,
) -> Result<&T, ReflectPathError<'p>>where
T: Reflect,
fn path<'p, T>(
&self,
path: impl ReflectPath<'p>,
) -> Result<&T, ReflectPathError<'p>>where
T: Reflect,
path
. Read moreSource§fn path_mut<'p, T>(
&mut self,
path: impl ReflectPath<'p>,
) -> Result<&mut T, ReflectPathError<'p>>where
T: Reflect,
fn path_mut<'p, T>(
&mut self,
path: impl ReflectPath<'p>,
) -> Result<&mut T, ReflectPathError<'p>>where
T: Reflect,
path
. Read moreSource§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
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> ⓘ
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> ⓘ
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 moreSource§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Source§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.