nem0 / LumixEngine

3D C++ Game Engine - yet another open source game engine
MIT License
3.53k stars 398 forks source link

Large world frustum precision issue #1427

Open nem0 opened 2 years ago

nem0 commented 2 years ago

Frustum::setPlanesFromPoints() and ShiftedFrustum::setPlanesFromPoints() computes normals as points[0] - points[1], which has precision issues far from [0, 0, 0].

See where setPlanesFromPoints is used and replace it.