Skip to content
Discussion options

You must be logged in to vote

Hi,

We can do tensor[dr.isnan(tensor)] = 0 in python.

But in general "there might be NaN values for rays that do not intersect at all" this is not supposed to be the case. For rays that don't intersect with anything, the preliminary intersection (by Optix/Embree) returns pi.t as inf, which inactivates these lanes (si.is_valid() tests if si.t is not inf) in all later computation. All fields should be zero-initialized. Nan usually happens because of a divide by zero or similar operation.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zichenwang01
Comment options

Answer selected by zichenwang01
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