appleseed icon indicating copy to clipboard operation
appleseed copied to clipboard

Fix orennayarbrdf.cpp: no longer try to normalizes zero vectors.

Open andreasdeclercq opened this issue 3 years ago • 1 comments

Calculate the norm of each vector first and do an early return if zero. This avoids asserts in debug mode and divisions by null in release mode.

andreasdeclercq avatar Mar 18 '21 16:03 andreasdeclercq

Thanks for your contribution @andreasdeclercq !

This avoids asserts in debug mode and divisions by null in release mode.

Can you please explain in which case you get divisions by null ? That would be great if you could provide a scene so that we can test.

oktomus avatar Apr 10 '21 18:04 oktomus