Is there a change to limit the depth (z-direction) of DebugCameraPrimitive? Currently, the depth seems close to infinity, and modifying the frustum parameters near and far doesn’t seem to have an impact.
My local branch fixes a slightly different problem which sets tighter bounds on the near far plane. The problem here is the use of frameState which @omar brought up, creating a feedback loop where the debug primitive is created, the scene’s camera adjusts its frustums to fit the debug primitive, then the debug primitive uses the scene’s frustum splits to get even larger, then the scene’s camera adjusts it’s frustums to fit the larger debug primitive, and so on, eventually getting quite large.
I agree that DebugCameraPrimitive shouldn’t be using the scene’s frustum splits at all. But then this will mean it can only render one frustum per camera, as the camera class doesn’t have a concept of multi-frustum, which will break some debug visualizations in the cesium inspector.