Skip to content
Discussion options

You must be logged in to vote

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 in active = si_bsdf.is_valid() ...

I believe that should be enough 😄

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Mephisto405
Comment options

@njroussel
Comment options

@Mephisto405
Comment options

@njroussel
Comment options

Answer selected by Mephisto405
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants