Vectorize BSDFContext#731
Conversation
6bd8773 to
2808967
Compare
2808967 to
2d3b8cd
Compare
|
Just a quick note (also for Nicolas): I am a little skeptical about this change and the cost/complexity that it adds. Let's discuss further after the SIGGRAPH Asia deadline. |
|
Pinging @wjakob and @njroussel for discussing this PR further. |
|
Thanks for the reminder 😄 I don't have any strong opinions on this. I personally don't feel like this adds a whole lot of additional complexity to the renderer. The only reason why I wouldn't want to merge this PR is because we don't have an actual supported use case for it (yet - maybe LPEs). However, there have been discussions/threads of people needing more "specialization" per ray and this would be a step towards that. Can you tell us more about what your initial thoughts were on this PR @wjakob? |
|
After discussing with @njroussel , it was decided not to merge this PR into |
3f3b8d0 to
1bdea6e
Compare
ff60350 to
4504654
Compare
Description
This PR adds vectorization to the
BSDFContextdatastructure passed to the BSDF routines (e.g.eval(),sample(),pdf()). This allows the callee to specify the BSDF components and event types to be sampled/evaluated on a per-lane basis. This is very useful for implementing non-conventional integrators for the vectorized variants of Mitsuba (e.g. light path expression, ...).This PR adapts the code of all BSDFs to use masking logic to handle the non-scalar conditions based on the BSDF context object.
Testing
On top of the current test suite which already tests the activation/de-activation of the BSDF components using the BSDFConext, I added a simple test in
test_dielectric.pyto test it in a vectorized way.