Skip to content
Snippets Groups Projects
Commit 8949a721 authored by Pascal Engeler's avatar Pascal Engeler
Browse files

bugfixes

parent 7577fe88
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,7 @@ bool dielectric::scatter(
refraction_ratio = ir_inside / ir_outside;
ir_in = ir_inside;
ir_out = ir_outside;
extinct_in = extinction_inside.;
extinct_in = extinction_inside;
extinct_out = 0.;
relevant_normal = -rec.normal;
}
......@@ -103,5 +103,5 @@ double dielectric::reflectance(double cos_theta_in, double cos_theta_out, double
double dielectric::transmittance(double cos_theta_in, double cos_theta_out, double ir_in, double ir_out) const{
double ts = 2 * ir_in * cos_theta_in / ( ir_in * cos_theta_in + ir_out * cos_theta_out );
double tp = 2 * ir_in * cos_theta_in / ( ir_out * cos_theta_in + ir_in * cos_theta_out );
return 0.5 * (ts + tp)
return 0.5 * (ts + tp);
}
......@@ -2,9 +2,9 @@
ray::ray() {}
ray::ray(const point3& origin, const vec3& direction, double amplitude, double opl, double index_of_refraction, int phase_flips, int max_bounces)
ray::ray(const point3& origin, const vec3& direction, double amplitude, double opl, double index_of_refraction, double extinction_coeff, int phase_flips, int max_bounces)
: orig(origin), dir(direction), amplitude(amplitude), optical_path(opl), refractive_index(index_of_refraction),
phase_flips(phase_flips), source(0), bounces_left(max_bounces){
extinction_coeff(extinction_coeff), phase_flips(phase_flips), source(0), bounces_left(max_bounces){
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment