pub struct StandardMaterial { /* private fields */ }Expand description
MAT_ — Standard material (v0–v20, 268–352 bytes)
The primary material type with up to 18 texture layers (diffuse, specular, emissive, normal, height, etc.), blend mode, HDR multipliers, and per-version extensions for normal-blend and gloss layers.
Implementations§
Source§impl StandardMaterial
impl StandardMaterial
pub fn set_name(&mut self, value: &str)
Sourcepub fn additional_flags(&self) -> MaterialAdditionalFlag
pub fn additional_flags(&self) -> MaterialAdditionalFlag
Additional flags
pub fn set_additional_flags(&mut self, value: MaterialAdditionalFlag)
Sourcepub fn flags(&self) -> MaterialFlag
pub fn flags(&self) -> MaterialFlag
Material rendering flags
pub fn set_flags(&mut self, value: MaterialFlag)
Sourcepub fn blend_mode(&self) -> BlendMode
pub fn blend_mode(&self) -> BlendMode
Alpha blend mode
pub fn set_blend_mode(&mut self, value: BlendMode)
pub fn set_priority(&mut self, value: i32)
Sourcepub fn rtt_channels(&self) -> u32
pub fn rtt_channels(&self) -> u32
RTT channel mask
pub fn set_rtt_channels(&mut self, value: u32)
Sourcepub fn specular_exponent(&self) -> f32
pub fn specular_exponent(&self) -> f32
Specular highlight exponent
pub fn set_specular_exponent(&mut self, value: f32)
Sourcepub fn depth_blend_falloff(&self) -> f32
pub fn depth_blend_falloff(&self) -> f32
Depth blend falloff distance
pub fn set_depth_blend_falloff(&mut self, value: f32)
Sourcepub fn alpha_test_threshold(&self) -> u32
pub fn alpha_test_threshold(&self) -> u32
Alpha test cut-off value
pub fn set_alpha_test_threshold(&mut self, value: u32)
Sourcepub fn hdr_specular_multiplier(&self) -> f32
pub fn hdr_specular_multiplier(&self) -> f32
HDR specular multiplier
pub fn set_hdr_specular_multiplier(&mut self, value: f32)
Sourcepub fn hdr_emissive_multiplier(&self) -> f32
pub fn hdr_emissive_multiplier(&self) -> f32
HDR emissive multiplier
pub fn set_hdr_emissive_multiplier(&mut self, value: f32)
Sourcepub fn hdr_environment_constant(&self) -> f32
pub fn hdr_environment_constant(&self) -> f32
HDR environment constant (v20)
pub fn set_hdr_environment_constant(&mut self, value: f32)
Sourcepub fn hdr_environment_diffuse(&self) -> f32
pub fn hdr_environment_diffuse(&self) -> f32
HDR environment diffuse (v20)
pub fn set_hdr_environment_diffuse(&mut self, value: f32)
Sourcepub fn hdr_environment_specular(&self) -> f32
pub fn hdr_environment_specular(&self) -> f32
HDR environment specular (v20)
pub fn set_hdr_environment_specular(&mut self, value: f32)
Sourcepub fn material_class(&self) -> MaterialClass
pub fn material_class(&self) -> MaterialClass
Material class (unit, building, etc.)
pub fn set_material_class(&mut self, value: MaterialClass)
Sourcepub fn layer_blend_mode(&self) -> LayerBlendOp
pub fn layer_blend_mode(&self) -> LayerBlendOp
Layer blend operation
pub fn set_layer_blend_mode(&mut self, value: LayerBlendOp)
Sourcepub fn emissive_blend_mode_1(&self) -> LayerBlendOp
pub fn emissive_blend_mode_1(&self) -> LayerBlendOp
Emissive layer 1 blend mode
pub fn set_emissive_blend_mode_1(&mut self, value: LayerBlendOp)
Sourcepub fn emissive_blend_mode_2(&self) -> LayerBlendOp
pub fn emissive_blend_mode_2(&self) -> LayerBlendOp
Emissive layer 2 blend mode
pub fn set_emissive_blend_mode_2(&mut self, value: LayerBlendOp)
Sourcepub fn specular_mode(&self) -> SpecularMode
pub fn specular_mode(&self) -> SpecularMode
Specular computation mode
pub fn set_specular_mode(&mut self, value: SpecularMode)
Sourcepub fn parallax_height(&self) -> Ref<'_, AnimRefF32>
pub fn parallax_height(&self) -> Ref<'_, AnimRefF32>
Animated parallax height Borrows the field in place — no copy, no allocation.
pub fn parallax_height_mut(&mut self) -> RefMut<'_, AnimRefF32>
Sourcepub fn motion_blur_amount(&self) -> Ref<'_, AnimRefF32>
pub fn motion_blur_amount(&self) -> Ref<'_, AnimRefF32>
Animated motion blur amount Borrows the field in place — no copy, no allocation.
pub fn motion_blur_amount_mut(&mut self) -> RefMut<'_, AnimRefF32>
Sourcepub fn normal_blend_factors_len(&self) -> usize
pub fn normal_blend_factors_len(&self) -> usize
Normal blend factors (v19+)
Sourcepub fn normal_blend_factors(&self, index: usize) -> Option<Ref<'_, AnimRefF32>>
pub fn normal_blend_factors(&self, index: usize) -> Option<Ref<'_, AnimRefF32>>
Borrows element index in place. None when out of range.
pub fn normal_blend_factors_mut( &mut self, index: usize, ) -> Option<RefMut<'_, AnimRefF32>>
Sourcepub fn normal_blend_factors_iter(
&self,
) -> impl ExactSizeIterator<Item = Ref<'_, AnimRefF32>>
pub fn normal_blend_factors_iter( &self, ) -> impl ExactSizeIterator<Item = Ref<'_, AnimRefF32>>
Iterate the elements, borrowing each in turn.