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 fb8ea92ce8 - Show all commits

View File

@ -309,9 +309,7 @@ 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 let out_cd = in_lm * reflector.brdf(hit.normal, hit.incident.dir, -ray.dir);
* hit.normal.dot(-hit.incident.dir)
* reflector.brdf(hit.normal, 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;
} }