I'm currently programming a voxel engine with LWJGL and I want to optimize the fps. Can you explain me how to find out if a block is in the view of the camera? The informations I have are cubeX, cubeY, cubeZ, cameraX, cameraY, cameraZ, cameraPitch & cameraYaw.
Asked
Active
Viewed 1,189 times
0
-
You can't do frustum culling if you don't know the frustum. Camera position and orientation is far from being enough. – derhass Apr 18 '14 at 20:22
-
Ok. How can I get to know the frustum? – user2398960 Apr 18 '14 at 20:32
-
Was heißt eigentlich frustrum auf deutsch? – user2398960 Apr 18 '14 at 20:34
-
It is your code, we can't know how you set up your view frustum ("Pyramidenstumpf") – derhass Apr 18 '14 at 20:42
-
3You will need to calculate the frustum, in addition to cmaera position and orientation you will also need the viewport dimensions you are rendering to and distance to near/far planes, this is an (old) but thorough tutorial: http://www.lighthouse3d.com/tutorials/view-frustum-culling/ – stridecolossus Apr 25 '14 at 15:56