<p>Not sure I understand your question. You can't know ahead of time what direction to the env map you are sampling, so there's not really any way to know it's BRDF contribution.</p>

CC BY-SA 4.0
2024-12-27T00:12:25.500Z
2024-12-27T00:12:25.500Z
badatcode123
<p>I am writing a pathtracer, and I want to somehow incorporate importance sampling of the environment map. The obvious way to do this seems to use MIS to either importance sample from my material bsdf or a ray to my environment map. I am having a hard time making it work though, and I am feeling uncertain as to whether I can really say that it is unbiased.</p>
<p>The main problem I have is that if I have a very bright environment light on the opposite side of the material, it will pretty much be sampled at least 50% of time time according to MIS. I should know that sampling that direction won't contribute to reducing variance in any way, as the brdf in that direction is 0. But how can I incorporate this into my MIS &quot;flow&quot; while keeping it completely unbiased???</p>

CC BY-SA 4.0
2024-11-21T19:36:45.350Z
You could add a third sampling strategy that samples in the general direction of that bright light (e.g., a spherical Gaussian) and compute the MIS weights accordingly. This will remain unbiased.
Hubble
<raytracing><rendering><pathtracing><importance-sampling>
One-sample multiple importance sampling, with environment and brdf
Thomas Conrad
# One-sample multiple importance sampling, with environment and brdf

(Asked by: username_0 on 2024-11-21)

I am writing a pathtracer, and I want to somehow incorporate importance sampling of the environment map. The obvious way to do this seems to use MIS to either importance sample from my material bsdf or a ray to my environment map. I am having a hard time making it work though, and I am feeling uncertain as to whether I can really say that it is unbiased.

The main problem I have is that if I have a very bright environment light on the opposite side of the material, it will pretty much be sampled at least 50% of time time according to MIS. I should know that sampling that direction won't contribute to reducing variance in any way, as the brdf in that direction is 0. But how can I incorporate this into my MIS "flow" while keeping it completely unbiased???

**Tags:** raytracing, rendering, pathtracing, importance-sampling

> **Comments:**
> **username_1**: You could add a third sampling strategy that samples in the general direction of that bright light (e.g., a spherical Gaussian) and compute the MIS weights accordingly. This will remain unbiased.  

---

## 1 answers

### Answer by username_2 on 2024-12-27. Score: 0

Not sure I understand your question. You can't know ahead of time what direction to the env map you are sampling, so there's not really any way to know it's BRDF contribution.


---

