From 77a0d36705dd89898aeeea1c4a618432ace483b5 Mon Sep 17 00:00:00 2001 From: TheNumbat <mjslater@andrew.cmu.edu> Date: Sun, 29 Aug 2021 16:17:24 -0400 Subject: [PATCH] upper bound --- docs/pathtracer/environment_lighting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pathtracer/environment_lighting.md b/docs/pathtracer/environment_lighting.md index 9151d08..3d14bb2 100644 --- a/docs/pathtracer/environment_lighting.md +++ b/docs/pathtracer/environment_lighting.md @@ -87,7 +87,7 @@ Altogether, the final Jacobian is (wh / 2pi^2 sin(\theta)). - When computing areas corresponding to a pixel, use the value of theta at the pixel centers. - Compute the PDF and CDF in the constructor of `Sampler::Sphere::Image`, storing them values in fields `_pdf` and `_cdf`. See `rays/sampler.h`. - `Spectrum::luma()` returns the luminance (brightness) of a Spectrum. The weight assigned to a pixel should be proportional both its luminance and the solid angle it subtends. -- For inversion sampling, use `std::lower_bound`: it's a binary search. Read about it [here](https://en.cppreference.com/w/cpp/algorithm/lower_bound). +- For inversion sampling, use `std::upper_bound`: it's a binary search. Read about it [here](https://en.cppreference.com/w/cpp/algorithm/upper_bound). - If you didn't use the ray log to debug area light sampling, start using it now to visualize what directions are being sampled from the environment map. --- -- GitLab