Various minor PLBVH related changes.

-Use most significant bit instead of negative for internal nodes.
-Explicitly store root node index, so that it does not have to be 0.
-Check the root node first in PLBVH traversal.
-Fix rigid body clipping in RaytracedShadowDemo.
This commit is contained in:
Jackson Lee
2014-02-24 23:50:20 -08:00
parent e4fbd5332d
commit c782f4976c
5 changed files with 49 additions and 58 deletions

View File

@@ -187,6 +187,10 @@ void GpuRaytraceScene::renderScene()
void GpuRaytraceScene::renderScene2()
{
//If using the BVH to accelerate raycasting, the AABBs need to be updated or else they will
//not match the actual rigid body positions after integration. The result is that rigid bodies
//are not drawn or appear clipped, especially if they are moving quickly.
m_data->m_rigidBodyPipeline->setupGpuAabbsFull();
// GpuBoxPlaneScene::renderScene();
// return;