max-mapper / voxel-engine

3D HTML5 voxel game engine
http://maxogden.github.com/voxel-engine
BSD 3-Clause "New" or "Revised" License
1.29k stars 220 forks source link

frustum culling chunks? #79

Open max-mapper opened 11 years ago

max-mapper commented 11 years ago

when looking at the draw call previews in the WebGL inspector in newer Chrome i'm seeing a lot of draw calls for things that aren't in the view frustum.

apparently three.js has built in frustum culling but I imagine we could do it better if we did it manually?

max-mapper commented 11 years ago

see also http://www.youtube.com/watch?v=4EI5y0t98A0&t=28m0s

cc @mikolalysenko

mikolalysenko commented 11 years ago

Check out: https://npmjs.org/package/box-frustum

Should take care of the test for you. Integrating with 3.js is another matter...