Right now I’m using a function I got from a forum post, at line 565 which also calls a function at line 803, and is being called at line 477.
The frustum planes are being updated at line 385.
This happens when I check if the point is not in the frustum.
Logically, if I change the false to true at line 477 it should show the other side but it shows blank. Now if you remove the other culling part at line 471 you’d see that it’s displaying parts that are really far away but not parts right close to the camera:
if (UTILS.planeDotCoordinate(frustumPlanes[i], point) < 0) {
and like switching that to >?
I think that is working, because if you clip down to the lowest lod and then pass through the surface and then zoom backwards fast you can catch the missing chunks rebuild before the lod calc.
I mean logically I think its working, just from reading over what’s going on. It would be really hard to tell unless you had two cameras rendering one from your perspective which is doing the frustum pass, and then one that is just one you can look around with that does not do anything to that.
Regarding the warnings, that’s because you set an empty array for the position kind of your mesh. Just don’t set the positions if it is empty (or set a dummy vertex (0,0,0)).
https://www.babylonjs-playground.com/#ZU2FWP#66
I did the dummy vertex thing
I used SharedArrayBuffer to speed up the worker response message at line 620.
I inverted the position at the x and z at isInFrustum at line 605.