RenderKit / embree

Embree ray tracing kernels repository.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Strange code fragment

mjunix opened this issue · comments

https://github.com/embree/embree/blob/ee2263634f90d18bb748b167fdc08a92c157d387/kernels/bvh/bvh_node_obb_mb.h#L55
Is a.lower-a.lower intentional or a bug? If intentional, could (a.lower-a.lower)*scale be simplified to 0?

This is not a bug, the line space.p -= a.lower moves the coordinate space by a.lower. That line you refer to makes the same transform to the various bound components, and yes the a.lower-a.lower looks little weird, but is correct.