-
Notifications
You must be signed in to change notification settings - Fork 944
Closed
Description
Hi, I tried adding a triangle intersection routine using the Moller Trumbore algorithm.
I calculate the max and min of each vertice to get an AABB.
Without using the bvh class, this works properly (i.e. triangles are intersected and displayed properly).
My problem is that when I pass in the bvh root, this produces the following weird behavior across invocations of the executable (assume 3 triangles are added to the scene):
- No triangles are rendered.
- Only the first triangle is rendered.
- First two triangles are rendered.
This behavior is non-deterministic.
Could it be that the triangle primitive is a plane and not a 3D object; and the BVH construction scheme in the book is not designed for this? But then again rectangles are also used and they are planes.
I can't figure out where I should be investigating. Any pointers?