Struct rust_pathtracer::material::Material
source · pub struct Material {Show 21 fields
pub rgb: F3,
pub anisotropic: F,
pub emission: F3,
pub metallic: F,
pub roughness: F,
pub subsurface: F,
pub specular_tint: F,
pub sheen: F,
pub sheen_tint: F,
pub clearcoat: F,
pub clearcoat_gloss: F,
pub clearcoat_roughness: F,
pub spec_trans: F,
pub ior: F,
pub opacity: F,
pub alpha_mode: AlphaMode,
pub alpha_cutoff: F,
pub ax: F,
pub ay: F,
pub medium: Medium,
pub procedural: Option<FnPtr>,
}Expand description
The material struct holds all BSDF properties as well as the Medium.
Fields§
§rgb: F3§anisotropic: F§emission: F3§metallic: F§roughness: F§subsurface: F§specular_tint: F§sheen: F§sheen_tint: F§clearcoat: F§clearcoat_gloss: F§clearcoat_roughness: FDo not use clearcoat_roughness directly, it is for internal use only. Use clearcoat_gloss.
spec_trans: F§ior: F§opacity: F§alpha_mode: AlphaMode§alpha_cutoff: F§ax: F§ay: F§medium: Medium§procedural: Option<FnPtr>Implementations§
source§impl Material
impl Material
pub fn new() -> Self
sourcepub fn finalize(&mut self)
pub fn finalize(&mut self)
Material post-processing, called by the tracer after calling Scene::closest_hit()
sourcepub fn mix(&self, other: &Material, v: F) -> Material
pub fn mix(&self, other: &Material, v: F) -> Material
Mixes this material with another material