-
I am in the middle of the process of implementing Irawan paper using Python custom BSDF according to the C++ code in OG Mitsuba, and during (painful) debugging I have noticed that some statements involving comparison is not working, one quick example:
would yield
I understand I might have missed something, but in Mask operations there is no method to perform inequalities to re-implement some of the codes in Irawan. Is there any suitable way to go around this? Preferably, a way to transform |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi @c86-moe, You can use the # Arrays of width 2
a = mi.Float(1.0, 3.0)
b = mi.Float(2.0, 2.0)
c = mi.Float(3.0, 1.0)
# Will create a new array which when evaluated returns [3.0, 2.0]
d = dr.select(a > 1.0, b, c) |
Beta Was this translation helpful? Give feedback.
Hi @c86-moe,
You can use the
dr.select
mask operation when working with JitArray types