November 16, 2009

Still got the BSP bug...

so I'm trying to make the most of it.

Here's the story sofar. I'm walking the BSP tree and am using frustum culling to prune the tree down. I'm also using bitmasks to prevent against double rendering of faces. And I'm grouping faces per texture to cut down on texture switches.

The result: the framerate is quite steady, but it is steady at a very low number: just under five fps. This is despite the aggressive culling I have been doing. I just did some profiling and even when drawing only fifteen faces, making use of four textures, my framerates won't cross the five fps border.

At this point I'm thinking the problem is not with the BSP rendering. I'm thinking the problem is with the textures. I remember doing a simple skybox once (that's just six quads, each with one texture) and it was slow even then. And that was just a silly skybox...

If it is the texturing I don't have any immediate ideas on how to fix that. So I think I'll start with trying to verify if it is indeed texturing that's to blame. But given the minimal amount of vertices I'm pushing I don't see what else it could be.

Update: Well, disabling all texturing in the level doesn't help. My framerate is only marginally better, but still no five fps...

2 comments:

Dimitri said...

Performance issues? Hm, lets see. I hear it's a Mac you are working on... :p

Kris said...

Blasphemy!

Nah man, the mac had nothing to do with it. It was my own fault, as you will see in the next post.