A zero-dependency offline rendering engine in pure Rust — CPU path tracing, BVH acceleration, 16-band spectral rendering, PBR materials, animation & video export.
pubfnlinear(t:f64)->f64{
t
}pubfnease_in_quad(t:f64)->f64{
t * t
}pubfnease_out_quad(t:f64)->f64{1.0-(1.0- t)*(1.0- t)}pubfnease_in_out_quad(t:f64)->f64{if t <0.5{2.0* t * t
}else{1.0-(-2.0* t +2.0).powi(2)/2.0}}pubfnease_in_cubic(t:f64)->f64{
t * t * t
}pubfnease_out_cubic(t:f64)->f64{1.0-(1.0- t).powi(3)}pubfnease_in_out_cubic(t:f64)->f64{if t <0.5{4.0* t * t * t
}else{1.0-(-2.0* t +2.0).powi(3)/2.0}}pubfnease_in_sine(t:f64)->f64{1.0-(t *std::f64::consts::FRAC_PI_2).cos()}pubfnease_out_sine(t:f64)->f64{(t *std::f64::consts::FRAC_PI_2).sin()}pubfnease_in_out_sine(t:f64)->f64{-((std::f64::consts::PI* t).cos()-1.0)/2.0}pubfnease_in_expo(t:f64)->f64{if t ==0.0{0.0}else{(2.0f64).powf(10.0* t -10.0)}}pubfnease_out_expo(t:f64)->f64{if t ==1.0{1.0}else{1.0-(2.0f64).powf(-10.0* t)}}pubfnease_in_back(t:f64)->f64{let c1 =1.70158;let c3 = c1 +1.0;
c3 * t * t * t - c1 * t * t
}pubfnease_out_back(t:f64)->f64{let c1 =1.70158;let c3 = c1 +1.0;1.0+ c3 *(t -1.0).powi(3)+ c1 *(t -1.0).powi(2)}pubfnbounce_out(t:f64)->f64{let n1 =7.5625;let d1 =2.75;if t <1.0/ d1 {
n1 * t * t
}elseif t <2.0/ d1 {let t2 = t -1.5/ d1;
n1 * t2 * t2 +0.75}elseif t <2.5/ d1 {let t2 = t -2.25/ d1;
n1 * t2 * t2 +0.9375}else{let t2 = t -2.625/ d1;
n1 * t2 * t2 +0.984375}}