![]() |
Path Tracing
|

Classes | |
| struct | TriInfo |
| Pre-calculated triangle center stored for runtime. More... | |
| struct | BVHBuilder |
Functions | |
| bool | buildBVH (vector< GPUTriangle > &triangles, vector< BVHNode > &bvh_nodes) |
| Builds the BVH using a triangle list. Recursively splits each triangle node at median along the longest axis of its AABB, reorders triangles in place so each leaf references a range. The resulting array is written to bvh_noes with root at index 0. | |
| bool | uploadBVH (const vector< BVHNode > &bvh_nodes, GLuint &ssbo) |
| Uploads the BVH node array to GPU SSBO. Creates the buffer on first use and fills it with bvh_nodes. The shader reads this buffer starting from the root idx 0. | |
| bool buildBVH | ( | vector< GPUTriangle > & | triangles, |
| vector< BVHNode > & | bvh_nodes ) |
Builds the BVH using a triangle list. Recursively splits each triangle node at median along the longest axis of its AABB, reorders triangles in place so each leaf references a range. The resulting array is written to bvh_noes with root at index 0.
| triangles | In-out triangle buffer |
| bvh_nodes | Output flattened node array |
Uploads the BVH node array to GPU SSBO. Creates the buffer on first use and fills it with bvh_nodes. The shader reads this buffer starting from the root idx 0.
| bvh_nodes | The node array produced by buildBVH |
| ssbo | In-out SSBO handle, created if zero |