PDA

View Full Version : frustum culling on different height maps



targe
01-21-2004, 02:31 PM
Wonderful. I get frustum culling working beautifully on a test height map (A), but when I load in a new height map (B) which is about 4 times the size, frustum culling decides to screw up.

It *seems* as if regardless of where my camera is, the view frustum rotates around world coords 0,0,0 rather than the camera(?)

Any ideas? I only changed the heightmap!

Note: the code is an implementation of Mark Morley's example:
http://cslab.wheaton.edu/~dthulson/projects/Pirates/frustum.html

targe
01-21-2004, 02:41 PM
How long did that take? 5 mins?
The answer is that I was testing if a point was in the frustum without taking the map scale into account! Duh!

x/MAP_SCALE, y/MAP_SCALE, z/MAP_SCALE

Apologies. Hope this is useful to someone else!

http://www.opengl.org/discussion_boards/ubb/smile.gif