Shadow linking: Initial work towards MIS support #107439

Merged
Sergey Sharybin merged 17 commits from Sergey/blender:cycles-light-linking-mis into cycles-light-linking 2023-05-05 21:44:14 +02:00
1 changed files with 1 additions and 2 deletions
Showing only changes of commit 1f31187450 - Show all commits

View File

@ -67,8 +67,7 @@ ccl_device void shadow_linking_shade(KernelGlobals kg, IntegratorState state)
/* MIS weighting. */
float mis_weight = 1.0f;
if (!(path_flag & PATH_RAY_MIS_SKIP)) {
const float mis_ray_pdf = INTEGRATOR_STATE(state, path, mis_ray_pdf);
mis_weight = light_sample_mis_weight_nee(kg, ls.pdf, mis_ray_pdf);
mis_weight = light_sample_mis_weight_forward_lamp(kg, state, path_flag, &ls, ray.P);
}

This should be light_sample_mis_weight_forward_lamp.

The ray direction was chosen by BSDF sampling (forward), not light sampling (next event estimation).

This should be `light_sample_mis_weight_forward_lamp`. The ray direction was chosen by BSDF sampling (forward), not light sampling (next event estimation).
const Spectrum bsdf_spectrum = light_eval * mis_weight;