pub struct PrincipledMaterial3D { /* private fields */ }Expand description
Complete 1:1 Blender 4.x/5.x Principled BSDF material supporting glTF 2.0 core and all KHR PBR extensions.
Implementations§
Source§impl PrincipledMaterial3D
Conversion and GPU packing helpers for PrincipledMaterial3D.
impl PrincipledMaterial3D
Conversion and GPU packing helpers for PrincipledMaterial3D.
Sourcepub fn dielectric_f0(&self) -> f32
pub fn dielectric_f0(&self) -> f32
Sourcepub fn to_legacy_pbr(&self) -> PbrMaterial
pub fn to_legacy_pbr(&self) -> PbrMaterial
Sourcepub fn from_legacy_pbr(name: &str, legacy: PbrMaterial) -> Self
pub fn from_legacy_pbr(name: &str, legacy: PbrMaterial) -> Self
Sourcepub fn to_gpu_data(&self) -> GpuMaterialData3D
pub fn to_gpu_data(&self) -> GpuMaterialData3D
Source§impl PrincipledMaterial3D
impl PrincipledMaterial3D
pub fn get_name(&self) -> &String
pub fn get_mut_name(&mut self) -> &mut String
pub fn set_name(&mut self, val: String) -> &mut Self
pub fn get_base_color_factor(&self) -> [f32; 4]
pub fn get_mut_base_color_factor(&mut self) -> &mut [f32; 4]
pub fn set_base_color_factor(&mut self, val: [f32; 4]) -> &mut Self
pub fn get_base_color_texture(&self) -> Option<TextureSlot3D>
pub fn try_get_base_color_texture(&self) -> Option<TextureSlot3D>
pub fn get_mut_base_color_texture(&mut self) -> &mut Option<TextureSlot3D>
pub fn set_base_color_texture( &mut self, val: Option<TextureSlot3D>, ) -> &mut Self
pub fn get_metallic_factor(&self) -> f32
pub fn get_mut_metallic_factor(&mut self) -> &mut f32
pub fn set_metallic_factor(&mut self, val: f32) -> &mut Self
pub fn get_roughness_factor(&self) -> f32
pub fn get_mut_roughness_factor(&mut self) -> &mut f32
pub fn set_roughness_factor(&mut self, val: f32) -> &mut Self
pub fn get_metallic_roughness_texture(&self) -> Option<TextureSlot3D>
pub fn try_get_metallic_roughness_texture(&self) -> Option<TextureSlot3D>
pub fn get_mut_metallic_roughness_texture( &mut self, ) -> &mut Option<TextureSlot3D>
pub fn set_metallic_roughness_texture( &mut self, val: Option<TextureSlot3D>, ) -> &mut Self
pub fn get_normal_texture(&self) -> Option<TextureSlot3D>
pub fn try_get_normal_texture(&self) -> Option<TextureSlot3D>
pub fn get_mut_normal_texture(&mut self) -> &mut Option<TextureSlot3D>
pub fn set_normal_texture(&mut self, val: Option<TextureSlot3D>) -> &mut Self
pub fn get_normal_scale(&self) -> f32
pub fn get_mut_normal_scale(&mut self) -> &mut f32
pub fn set_normal_scale(&mut self, val: f32) -> &mut Self
pub fn get_occlusion_texture(&self) -> Option<TextureSlot3D>
pub fn try_get_occlusion_texture(&self) -> Option<TextureSlot3D>
pub fn get_mut_occlusion_texture(&mut self) -> &mut Option<TextureSlot3D>
pub fn set_occlusion_texture(&mut self, val: Option<TextureSlot3D>) -> &mut Self
pub fn get_occlusion_strength(&self) -> f32
pub fn get_mut_occlusion_strength(&mut self) -> &mut f32
pub fn set_occlusion_strength(&mut self, val: f32) -> &mut Self
pub fn get_emissive_factor(&self) -> [f32; 3]
pub fn get_mut_emissive_factor(&mut self) -> &mut [f32; 3]
pub fn set_emissive_factor(&mut self, val: [f32; 3]) -> &mut Self
pub fn get_emissive_texture(&self) -> Option<TextureSlot3D>
pub fn try_get_emissive_texture(&self) -> Option<TextureSlot3D>
pub fn get_mut_emissive_texture(&mut self) -> &mut Option<TextureSlot3D>
pub fn set_emissive_texture(&mut self, val: Option<TextureSlot3D>) -> &mut Self
pub fn get_emissive_strength(&self) -> f32
pub fn get_mut_emissive_strength(&mut self) -> &mut f32
pub fn set_emissive_strength(&mut self, val: f32) -> &mut Self
pub fn get_alpha_mode(&self) -> AlphaMode3D
pub fn get_mut_alpha_mode(&mut self) -> &mut AlphaMode3D
pub fn set_alpha_mode(&mut self, val: AlphaMode3D) -> &mut Self
pub fn get_alpha_cutoff(&self) -> f32
pub fn get_mut_alpha_cutoff(&mut self) -> &mut f32
pub fn set_alpha_cutoff(&mut self, val: f32) -> &mut Self
pub fn get_double_sided(&self) -> bool
pub fn get_mut_double_sided(&mut self) -> &mut bool
pub fn set_double_sided(&mut self, val: bool) -> &mut Self
pub fn get_unlit(&self) -> bool
pub fn get_mut_unlit(&mut self) -> &mut bool
pub fn set_unlit(&mut self, val: bool) -> &mut Self
pub fn get_ior(&self) -> f32
pub fn get_mut_ior(&mut self) -> &mut f32
pub fn set_ior(&mut self, val: f32) -> &mut Self
pub fn get_specular_factor(&self) -> f32
pub fn get_mut_specular_factor(&mut self) -> &mut f32
pub fn set_specular_factor(&mut self, val: f32) -> &mut Self
pub fn get_specular_color_factor(&self) -> [f32; 3]
pub fn get_mut_specular_color_factor(&mut self) -> &mut [f32; 3]
pub fn set_specular_color_factor(&mut self, val: [f32; 3]) -> &mut Self
pub fn get_specular_texture(&self) -> Option<TextureSlot3D>
pub fn try_get_specular_texture(&self) -> Option<TextureSlot3D>
pub fn get_mut_specular_texture(&mut self) -> &mut Option<TextureSlot3D>
pub fn set_specular_texture(&mut self, val: Option<TextureSlot3D>) -> &mut Self
pub fn get_specular_color_texture(&self) -> Option<TextureSlot3D>
pub fn try_get_specular_color_texture(&self) -> Option<TextureSlot3D>
pub fn get_mut_specular_color_texture(&mut self) -> &mut Option<TextureSlot3D>
pub fn set_specular_color_texture( &mut self, val: Option<TextureSlot3D>, ) -> &mut Self
pub fn get_clearcoat_factor(&self) -> f32
pub fn get_mut_clearcoat_factor(&mut self) -> &mut f32
pub fn set_clearcoat_factor(&mut self, val: f32) -> &mut Self
pub fn get_clearcoat_roughness_factor(&self) -> f32
pub fn get_mut_clearcoat_roughness_factor(&mut self) -> &mut f32
pub fn set_clearcoat_roughness_factor(&mut self, val: f32) -> &mut Self
pub fn get_clearcoat_texture(&self) -> Option<TextureSlot3D>
pub fn try_get_clearcoat_texture(&self) -> Option<TextureSlot3D>
pub fn get_mut_clearcoat_texture(&mut self) -> &mut Option<TextureSlot3D>
pub fn set_clearcoat_texture(&mut self, val: Option<TextureSlot3D>) -> &mut Self
pub fn get_clearcoat_roughness_texture(&self) -> Option<TextureSlot3D>
pub fn try_get_clearcoat_roughness_texture(&self) -> Option<TextureSlot3D>
pub fn get_mut_clearcoat_roughness_texture( &mut self, ) -> &mut Option<TextureSlot3D>
pub fn set_clearcoat_roughness_texture( &mut self, val: Option<TextureSlot3D>, ) -> &mut Self
pub fn get_clearcoat_normal_texture(&self) -> Option<TextureSlot3D>
pub fn try_get_clearcoat_normal_texture(&self) -> Option<TextureSlot3D>
pub fn get_mut_clearcoat_normal_texture(&mut self) -> &mut Option<TextureSlot3D>
pub fn set_clearcoat_normal_texture( &mut self, val: Option<TextureSlot3D>, ) -> &mut Self
pub fn get_transmission_factor(&self) -> f32
pub fn get_mut_transmission_factor(&mut self) -> &mut f32
pub fn set_transmission_factor(&mut self, val: f32) -> &mut Self
pub fn get_transmission_texture(&self) -> Option<TextureSlot3D>
pub fn try_get_transmission_texture(&self) -> Option<TextureSlot3D>
pub fn get_mut_transmission_texture(&mut self) -> &mut Option<TextureSlot3D>
pub fn set_transmission_texture( &mut self, val: Option<TextureSlot3D>, ) -> &mut Self
pub fn get_thickness_factor(&self) -> f32
pub fn get_mut_thickness_factor(&mut self) -> &mut f32
pub fn set_thickness_factor(&mut self, val: f32) -> &mut Self
pub fn get_attenuation_distance(&self) -> f32
pub fn get_mut_attenuation_distance(&mut self) -> &mut f32
pub fn set_attenuation_distance(&mut self, val: f32) -> &mut Self
pub fn get_attenuation_color(&self) -> [f32; 3]
pub fn get_mut_attenuation_color(&mut self) -> &mut [f32; 3]
pub fn set_attenuation_color(&mut self, val: [f32; 3]) -> &mut Self
pub fn get_sheen_color_factor(&self) -> [f32; 3]
pub fn get_mut_sheen_color_factor(&mut self) -> &mut [f32; 3]
pub fn set_sheen_color_factor(&mut self, val: [f32; 3]) -> &mut Self
pub fn get_sheen_roughness_factor(&self) -> f32
pub fn get_mut_sheen_roughness_factor(&mut self) -> &mut f32
pub fn set_sheen_roughness_factor(&mut self, val: f32) -> &mut Self
pub fn get_sheen_color_texture(&self) -> Option<TextureSlot3D>
pub fn try_get_sheen_color_texture(&self) -> Option<TextureSlot3D>
pub fn get_mut_sheen_color_texture(&mut self) -> &mut Option<TextureSlot3D>
pub fn set_sheen_color_texture( &mut self, val: Option<TextureSlot3D>, ) -> &mut Self
pub fn get_sheen_roughness_texture(&self) -> Option<TextureSlot3D>
pub fn try_get_sheen_roughness_texture(&self) -> Option<TextureSlot3D>
pub fn get_mut_sheen_roughness_texture(&mut self) -> &mut Option<TextureSlot3D>
pub fn set_sheen_roughness_texture( &mut self, val: Option<TextureSlot3D>, ) -> &mut Self
Trait Implementations§
Source§impl Clone for PrincipledMaterial3D
impl Clone for PrincipledMaterial3D
Source§impl Debug for PrincipledMaterial3D
impl Debug for PrincipledMaterial3D
Source§impl Default for PrincipledMaterial3D
Default Blender Principled BSDF dielectric preset for PrincipledMaterial3D.
impl Default for PrincipledMaterial3D
Default Blender Principled BSDF dielectric preset for PrincipledMaterial3D.
Source§impl PartialEq for PrincipledMaterial3D
impl PartialEq for PrincipledMaterial3D
impl StructuralPartialEq for PrincipledMaterial3D
Auto Trait Implementations§
impl Forget for PrincipledMaterial3D
impl Freeze for PrincipledMaterial3D
impl Move for PrincipledMaterial3D
impl RefUnwindSafe for PrincipledMaterial3D
impl Send for PrincipledMaterial3Dwhere
RawVecInner: Send,
impl Sync for PrincipledMaterial3Dwhere
RawVecInner: Sync,
impl Unpin for PrincipledMaterial3D
impl UnsafeUnpin for PrincipledMaterial3D
impl UnwindSafe for PrincipledMaterial3Dwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
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