xshazwar / mountains-beyond-mountains

MIT License
20 stars 6 forks source link

bug: culling doesn't work well with very large height values #2

Closed xshazwar closed 2 years ago

xshazwar commented 2 years ago

We currently cull by checking the 8 corners of the tile against the camera FoV. It's possible with large heights (1000x, 1000z, 5000y) to have a tile directly in front of the camera culled because you're looking through the middle of the tile without a corner being in the FoV.

xshazwar commented 2 years ago

fixed with 6d554dc6612767364827b2df3300c3c3e8e1e88a. Also improved performance but #1 is still a valid optimization