PDA

View Full Version : How to create frustum culling from an orthographic projection for a 2D tile game?.



SamyyBlaze
07-04-2016, 09:43 PM
I'm currently working on a 2d tiled based game, in which when I render many tiles, the fps goes seriously down. I know why this is happening, its happening because they are a lot of objects being created and rendered at the same time. I read that we need something called frustum culling, i'm trying to implement and create that. But I don't know how to create a frustum from an orthographic projection. I have read many articles, searching all day, but couldn't find anything that can help.

Note: I'm using VBOs and a sprite sheet.
If you want any of my code, please ask me.
Thanks.

BBeck1
07-05-2016, 04:16 AM
A frustum doesn't really make sense in an orthographic projection. A frustum is a box in orthographic projection. Unless you have a bunch of sprites you are drawing off screen, it would seem to me that you are already doing this.

I would think "batching" is the answer, to limit the number of draw calls you are making.