compute final light level (per vertex) #3

Closed
noteuclid wants to merge 37 commits from vertex-light into two-way
Showing only changes of commit a51f46a038 - Show all commits

View File

@ -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;
} }