fix a bug
it's invisible with Lambertian model though
This commit is contained in:
parent
fb8ea92ce8
commit
a51f46a038
|
|
@ -309,7 +309,8 @@ impl Core {
|
||||||
assert!(hit.incident.dir.is_normalized());
|
assert!(hit.incident.dir.is_normalized());
|
||||||
let reflector = Lambertian;
|
let reflector = Lambertian;
|
||||||
let in_lm = 1.0;
|
let in_lm = 1.0;
|
||||||
let out_cd = in_lm * reflector.brdf(hit.normal, hit.incident.dir, -ray.dir);
|
let out_cd =
|
||||||
|
in_lm * reflector.brdf(light_hit.normal, light_hit.incident.dir, -ray.dir);
|
||||||
let weight = accum_normalizator * (-0.5 * d2 / sigma2).exp();
|
let weight = accum_normalizator * (-0.5 * d2 / sigma2).exp();
|
||||||
total_cd += weight * out_cd;
|
total_cd += weight * out_cd;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user