How to modify the camera's visible region by adjusting the projection matrix without changing the view matrix?

Description:
I need to modify the camera’s visible region by adjusting the projection matrix, i.e., how can I shift the camera’s frustum without altering the view matrix?

I noticed that the projectionMatrix of PerspectiveOffCenterFrustum is a getter, and attempting to adjust the frustum’s xoffset/yoffset parameters does not effectively change the visible region.

Question:
How can I directly modify the projection matrix and ensure it takes effect during rendering, achieving a dynamic shift in the camera’s observable area?

Additional Context :
Goal: Achieve effects like oblique frustums or viewport shifts (e.g., for asymmetric projections).

Hi there,

PerspectiveOffCenterFrustum seems to be designed for a symmetric projection defined by the frustum dimensions.

I’d advise creating a new *Frustum class which implement the same interface as PerspectiveOffCenterFrustum, but allows you to specify the projection matrix directly in the constructor and by a getter/setter.

I may not have expressed it clearly enough. While modifying the frustum (PerspectiveFrustum) projection of my scene camera, I discovered that the frustum’s projection is actually derived from the internal property this._offCenterFrustum.projectionMatrix (where _offCenterFrustum is an instance of PerspectiveOffCenterFrustum). Upon examining the constructor of PerspectiveFrustum, I noticed that xOffset and yOffset can be used to manipulate the frustum boundaries, thereby altering the projectionMatrix of the frustum.

However, although the clipping range of the scene has changed, the actual visible area I observe remains unchanged. This results in me seeing regions that have been culled during rendering (black blocks), which I find difficult to understand. What should I do to apply the changes in the projectionMatrix caused by these offsets to the rendering pipeline, so that the visible area is adjusted accordingly?

a link for The simplest example in sandcastle

I’m wondering how changing the xOffset and yOffset of the frustum should affect the view. (This is not a lack of clarity of your request, but rather my lack of understanding what these parameters are supposed to do…).

But just to confirm: You are not just looking for changing the FOV, right?

The x/yOffset is indeed not that important because what I want to achieve is a viewable area change in the view, similar to a pan operation (instead of using fov to scale the view), but due to business needs, I cannot move the camera’s location (that is, the camera’s view matrix). What I want to change is the projection matrix;
Returning to the question, from my examination of the frustum part of the Cesium code, I found that I cannot change this matrix. Only xOffset and yOffset can change the boundary of the frustum and thus affect the projection matrix, but these two parameters do not achieve the expected panning effect of the view and result in black blocks. My guess is that modifying the x/yOffset alters the clipping area,
But my perspective has not changed, so the theoretically unrendered part has become visible to me. To address the question, how do I change the projection matrix? Modifying this value should also be applied to scene rendering, thereby changing the observable area of the scene


this is a new sandcastle example for projectionMatrix with the offset changed is valid

Then the rendering of scene elements changes the projectionMatrix along with the offset( The last time’s answer link: The simplest example in sandcastle), so the entire MVP transformation should also change, and the content I see should also change accordingly.