Getting the first non-specular bounce #495
-
Hello, I'm genuinely enjoying programming with Mitsuba 3, which is easier than Mitsuba 0.6 + 2.0. Given the
But I got the error below at the
I thought my loop condition Any help would be appreciated!! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi!
Can you try with this instead:
The error message is a bit misleasing here. I'd encourage you to take a look at the Dr.Jit documentation on recorded loops. As a rule of thumb, your loop state variables should usually be all variables which need to be read before written at any iteration. Here, you need to read I believe that should be enough 😄 |
Beta Was this translation helpful? Give feedback.
Hi!
loop = mi.Loop(name="BSDF ray tracing", state=lambda: (si_bsdf))
Can you try with this instead:
loop = mi.Loop(name="BSDF ray tracing", state=lambda: (active, si_bsdf))
The error message is a bit misleasing here. I'd encourage you to take a look at the Dr.Jit documentation on recorded loops. As a rule of thumb, your loop state variables should usually be all variables which need to be read before written at any iteration. Here, you need to read
active
(in the loop condition) at every iteration before you write to it inactive = si_bsdf.is_valid() ...
I believe that should be enough 😄