Use frustum culling to avoid drawing entities that are outside of the player's field of view. It's the one of the simplest and most effective scene management techniques.
Find the source code here: github.com/BSV...
A paper on how to get the planes from the projection matrix can be found here: gamedevs.org/up... It's not terribly educational so I'm omitted it.
Question? Leave a comment below, or ask me on Twitter: / vinobs
28 сен 2024