Files
blender/intern/cycles/kernel
Sebastian Herholz fbc884d2a8 Ensure BSDF evals and pdfs are zero on invalid samples
Currently, the `eval` and `pdf` are not explicitly set to zero when a BSDF sample is invalid (e.g., below the upper hemisphere), when calling
`bsdf_sample` or `bsdf_eval`. It is assumed that `eval` and `pdf` are set to zero before these functions are called, which can cause problems if not.

This patch fixes this potential problem by explicitly setting `eval` and `pdf` to zero when the sampled direction is invalid.

I also added a sanity check if `eval` and `pdf` are valid (i.e., >= 0.f).
The check is activated when build in debug mode and with the `WITH_CYCLES_DEBUG` set to `ON`.

Reviewed By: brecht, sergey

Differential Revision: https://developer.blender.org/D14776
2022-04-28 18:14:06 +02:00
..
2022-02-11 17:47:34 +01:00
2022-02-11 17:47:34 +01:00
2022-04-02 06:14:27 +02:00
2022-02-11 17:47:34 +01:00
2022-02-11 17:47:34 +01:00
2022-02-11 17:47:34 +01:00