pub struct Mix<B1, B2> {
pub b1: B1,
pub b2: B2,
pub factor: f32,
}Expand description
BSDF that can blend two arbitrary BSDF’s together
Fields§
§b1: B1§b2: B2§factor: f32Trait Implementations§
Source§impl<B1, B2> BSDF for Mix<B1, B2>
impl<B1, B2> BSDF for Mix<B1, B2>
Source§fn evaluate(&self, omega_o: Vec3d, omega_i: Vec3d) -> RgbD
fn evaluate(&self, omega_o: Vec3d, omega_i: Vec3d) -> RgbD
Returns the value of the BSDF at the given directions Read more
Source§fn emission(&self, omega_o: Vec3d) -> RgbD
fn emission(&self, omega_o: Vec3d) -> RgbD
Returns how much light is emitted to the given direction
omega_oSource§fn sample_incoming(&self, omega_o: Vec3d, rdf: Vec3d) -> SampleIncomingResponse
fn sample_incoming(&self, omega_o: Vec3d, rdf: Vec3d) -> SampleIncomingResponse
Given a direction where light is scattered to, samples an incident direction, from which the light
may come from Read more
Source§fn sample_outgoing(&self, omega_i: Vec3d, rdf: Vec3d) -> SampleOutgoingResponse
fn sample_outgoing(&self, omega_i: Vec3d, rdf: Vec3d) -> SampleOutgoingResponse
Given an incident light direction, samples a direction where light is scattered to Read more
Source§fn sample_emission(&self, rd: Vec2d) -> SampleEmissionResponse
fn sample_emission(&self, rd: Vec2d) -> SampleEmissionResponse
Samples a direction in which light is emitted to and also returns the amount of emission
The returned vector is the null vector, if this surface does not emit any light
See also:
SampleEmissionResponseSource§fn sample_incoming_pdf(&self, omega_o: Vec3d, omega_i: Vec3d) -> f64
fn sample_incoming_pdf(&self, omega_o: Vec3d, omega_i: Vec3d) -> f64
Returns the probability density sampling an incoming direction given an outgoing direction
See
BSDF::sample_incoming and SampleIncomingResponseSource§fn sample_outgoing_pdf(&self, omega_o: Vec3d, omega_i: Vec3d) -> f64
fn sample_outgoing_pdf(&self, omega_o: Vec3d, omega_i: Vec3d) -> f64
Returns the probability density sampling an outgoing direction given an incoming direction
See
BSDF::sample_outgoing_pdf and SampleOutgoingResponseSource§fn sample_emission_pdf(&self, omega_o: Vec3d) -> f64
fn sample_emission_pdf(&self, omega_o: Vec3d) -> f64
Returns the probability density of choosing the given direction when sampled with
BSDF::sample_emission
Returns 0.0 if the surface does not emit lightSource§fn base_color(&self, omega_o: Vec3d) -> RgbD
fn base_color(&self, omega_o: Vec3d) -> RgbD
Returns the base color of the surface.
This function is used to generate auxiliary images for AI tools such as Open Image Denoise
Auto Trait Implementations§
impl<B1, B2> Freeze for Mix<B1, B2>
impl<B1, B2> RefUnwindSafe for Mix<B1, B2>where
B1: RefUnwindSafe,
B2: RefUnwindSafe,
impl<B1, B2> Send for Mix<B1, B2>
impl<B1, B2> Sync for Mix<B1, B2>
impl<B1, B2> Unpin for Mix<B1, B2>
impl<B1, B2> UnsafeUnpin for Mix<B1, B2>where
B1: UnsafeUnpin,
B2: UnsafeUnpin,
impl<B1, B2> UnwindSafe for Mix<B1, B2>where
B1: UnwindSafe,
B2: 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