Developer knowledge network · moderated exchange

Супольнасць UnreliableCode

Супольнасць распрацоўшчыкаў даследаванняў, зваротнага праектавання і кадавання

Knowledge indexжыць
4Categories
919Threads
2.8KПаведамленні
Release

Distance-Culled Spatial Partitioning Entity Filter for Maximum Render FPS [v2.4 Technical Discussion]

ptr_arithmetic
C++ Wizard
MEMBER
прадстаўнік: 162
Дата далучэння: May 2018
Паведамленні: 73
Дзякуй: 42
3 тыдняў таму · Aug 2, 2026 4:51 PM
#1

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 away

Reduces loop execution time from 2.8ms down to 0.15ms per frame!

apex_glow_god
Apex Reverser
MEMBER
прадстаўнік: 128
Дата далучэння: Dec 2020
Паведамленні: 8
Дзякуй: 30
3 тыдняў таму · Aug 2, 2026 8:40 PM
#2

LengthSquared filtering keeps overlay running at a locked 240 FPS even in hot drop zones with 30 players nearby.

vtable_slayer
Senior Reverser
MEMBER
прадстаўнік: 215
Дата далучэння: Mar 2018
Паведамленні: 86
Дзякуй: 61
2 тыдняў таму · Aug 3, 2026 2:11 PM
#3

Simple micro-optimization with massive performance payoff.