3주 전 · Aug 2, 2026 4:51 PM
Why rendering 100 loot items and distant players kills overlay FPS:
Use squared distance filtering to eliminate expensive sqrt() math:
CPP
float distSq = (pEnt->GetOrigin() - localOrigin).LengthSquared();
if (distSq > (350.0f * 350.0f)) continue; // Skip entities > 350m awayReduces loop execution time from 2.8ms down to 0.15ms per frame!