mitsuba-renderer / drjit

Dr.Jit — A Just-In-Time-Compiler for Differentiable Rendering
BSD 3-Clause "New" or "Revised" License
593 stars 43 forks source link

Fix array shape in dr.quat_to_matrix #135

Closed tomix1024 closed 1 year ago

tomix1024 commented 1 year ago

If I have a simple mi.Quaternion4f q in Python, the matrix type is not correctly derived when calling dr.quat_to_matrix(q).

njroussel commented 1 year ago

Hi @tomix1024

Thank you, this indeed seems correct. Do you mind adding a test for it too in test_matrix.py?

tomix1024 commented 1 year ago

Hi @njroussel,

That's actually a good idea, I've added some tests. There was also a problem with dr.select(mi.Bool, mi.Quaternion4f, mi.Quaternion4f), which tried to create a value of type mi.Quaternion4b internally, which does not exist...

njroussel commented 1 year ago

Great, I don't have anything to add. Thank you very much!