Clean up decal behavior
Only update the mesh if a decal was truly created/destroyed
This commit is contained in:
parent
c2901404d5
commit
4d5bba8d02
4 changed files with 22 additions and 13 deletions
|
|
@ -85,11 +85,14 @@ void CPUAccelStruct::FindFirstHit(const RayBBox& ray, int a, TraceHit* hit)
|
|||
}
|
||||
}
|
||||
|
||||
extern glcycle_t DynamicBLASTime;
|
||||
|
||||
void CPUAccelStruct::Update()
|
||||
{
|
||||
if (Mesh->UploadRanges.Index.Size() == 0)
|
||||
return;
|
||||
|
||||
DynamicBLASTime.ResetAndClock();
|
||||
InstanceCount = (Mesh->Mesh.IndexCount + IndexesPerBLAS - 1) / IndexesPerBLAS;
|
||||
|
||||
bool needsUpdate[32] = {};
|
||||
|
|
@ -112,6 +115,7 @@ void CPUAccelStruct::Update()
|
|||
DynamicBLAS[instance] = CreateBLAS(indexStart, indexEnd - indexStart);
|
||||
}
|
||||
}
|
||||
DynamicBLASTime.Unclock();
|
||||
|
||||
CreateTLAS();
|
||||
Upload();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue