Question by
holybell84 · May 18, 2019 at 07:20 AM ·
cameraviewport
Viewport affecting custom projection matrix
I am working on a project that requires me to align 2 oblique camera frustum and render them each to half of the window. The problem I encountered was that when ever I change the width of the viewport, the gizmo for rendering the camera frustum will indicate a slightshift, misaligning my camera views. Are there any ways to just changing the viewport width without changing the frustum?
In attached images, rendering 1 has viewport width of 1.0f, and rendering2 width of 0.25f. The white line is the default camera gizmo rendering while the blue are the rays rendering from the camera to frustum corners, obtained by Camera.CalculateFrustumCorners.
rendering2.png
(20.2 kB)
rendering1.png
(27.3 kB)
Comment