Hey there again!
I got stuck with the terrain, when it comes to Frustum Culling. Actually it works well, but there are some tiles that don't get clipped although it's obvious that they're out of the view frustum.
I think it has something to do with the formula I'm using for detection whether a tile is in view or not. It's the 'common' CubeInFrustum formula that is described in all Frustum Culling tutorials. It checks whether all points of a cube are behind one of the clipping planes. If so, it can't be visible. But in some cases this detection failes. Usually this should be no problem at all, but in this case it's quite a lot tiles that would be drawn this way.
A little screenshot (blue = as visible detected tiles, yellow = eye), should be self-explaining:
[This was an image]
Any ideas?
Edit:
OK, I got it working now. The problem was in the CubeInFrustum formula - I had to add some stuff (and that was wrong *g*).
I got stuck with the terrain, when it comes to Frustum Culling. Actually it works well, but there are some tiles that don't get clipped although it's obvious that they're out of the view frustum.
I think it has something to do with the formula I'm using for detection whether a tile is in view or not. It's the 'common' CubeInFrustum formula that is described in all Frustum Culling tutorials. It checks whether all points of a cube are behind one of the clipping planes. If so, it can't be visible. But in some cases this detection failes. Usually this should be no problem at all, but in this case it's quite a lot tiles that would be drawn this way.
A little screenshot (blue = as visible detected tiles, yellow = eye), should be self-explaining:
[This was an image]
Any ideas?
Edit:
OK, I got it working now. The problem was in the CubeInFrustum formula - I had to add some stuff (and that was wrong *g*).