Also expand the bbox for the TLAS tree
This commit is contained in:
parent
bc5bf8ca7b
commit
6190ffecda
1 changed files with 8 additions and 0 deletions
|
|
@ -257,6 +257,14 @@ int CPUAccelStruct::Subdivide(int* instances, int numInstances, const FVector3*
|
|||
}
|
||||
median /= (float)numInstances;
|
||||
|
||||
// For numerical stability
|
||||
min.X -= 0.1f;
|
||||
min.Y -= 0.1f;
|
||||
min.Z -= 0.1f;
|
||||
max.X += 0.1f;
|
||||
max.Y += 0.1f;
|
||||
max.Z += 0.1f;
|
||||
|
||||
if (numInstances == 1) // Leaf node
|
||||
{
|
||||
TLAS.Nodes.push_back(Node(min, max, instances[0]));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue