nint22 / dwarfcraft

Automatically exported from code.google.com/p/dwarfcraft
Other
0 stars 0 forks source link

Apply view-volume culling #165

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
All chunks that are infront of the camera's plane should be rendered; we can 
check for this using the following simple algorithm:

For each chunk, given the camera position C and the chunk position P
If the cross product between the vector from C and vector from (P - C) is 
positive (i.e. greater than 90 degrees), render the chunk

Original issue reported on code.google.com by nin...@gmail.com on 2 Mar 2012 at 8:33

GoogleCodeExporter commented 9 years ago
Done! Both distance and forward-view checking. Great performance; 60fps on a 
512x512 map.

Original comment by nin...@gmail.com on 2 Mar 2012 at 9:29

GoogleCodeExporter commented 9 years ago
*Forgot to close

Original comment by nin...@gmail.com on 2 Mar 2012 at 9:30