mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0027590: Visualization, Ray Tracing - port to quad BVH trees (QBVH)
In frames of this issue binary BVH tree produced by building algorithms was collapsed into 4-ary BVH (QBVH). The BVH traversal code in GLSL was modified to process such trees correctly. This allows to implore thread coherence, decrease BVH memory consumption (~2 times), and use traversal stack of the half size. As a result, ray tracing scalability is improved, as well as rendering performance. For various setups, speedup is 12-18%.
This commit is contained in:
@@ -361,8 +361,8 @@ void SelectMgr_ViewerSelector::traverseObject (const Handle(SelectMgr_Selectable
|
||||
{
|
||||
if (!aSensitivesTree->IsOuter (aNode))
|
||||
{
|
||||
const Standard_Integer aLeftChildIdx = aSensitivesTree->LeftChild (aNode);
|
||||
const Standard_Integer aRightChildIdx = aSensitivesTree->RightChild (aNode);
|
||||
const Standard_Integer aLeftChildIdx = aSensitivesTree->Child<0> (aNode);
|
||||
const Standard_Integer aRightChildIdx = aSensitivesTree->Child<1> (aNode);
|
||||
const Standard_Boolean isLeftChildIn = aMgr.Overlaps (aSensitivesTree->MinPoint (aLeftChildIdx),
|
||||
aSensitivesTree->MaxPoint (aLeftChildIdx));
|
||||
const Standard_Boolean isRightChildIn = aMgr.Overlaps (aSensitivesTree->MinPoint (aRightChildIdx),
|
||||
@@ -467,8 +467,8 @@ void SelectMgr_ViewerSelector::TraverseSensitives()
|
||||
{
|
||||
if (!aBVHTree->IsOuter (aNode))
|
||||
{
|
||||
const Standard_Integer aLeftChildIdx = aBVHTree->LeftChild (aNode);
|
||||
const Standard_Integer aRightChildIdx = aBVHTree->RightChild (aNode);
|
||||
const Standard_Integer aLeftChildIdx = aBVHTree->Child<0> (aNode);
|
||||
const Standard_Integer aRightChildIdx = aBVHTree->Child<1> (aNode);
|
||||
const Standard_Boolean isLeftChildIn =
|
||||
mySelectingVolumeMgr.Overlaps (aBVHTree->MinPoint (aLeftChildIdx),
|
||||
aBVHTree->MaxPoint (aLeftChildIdx));
|
||||
|
Reference in New Issue
Block a user