BGE : Fix T36285 Wrong viewport scale.
Fix of T36285, I just invalidate projection matrix when a camera switch to viewport mode, because we need to rewrite the projection matrix in RenderFrame. It worked with old blender version because when you use viewport render one camera is added in the camera list and initialize its projection matrix for the first time. But when we used several cameras + viewport for splitscreen we had issues. Reviewers: dfelinto, hg1, ben2610, lordloki, moguri Reviewed By: moguri Projects: #game_rendering, #game_engine Differential Revision: https://developer.blender.org/D1202
This commit is contained in:
parent
441f68e2b0
commit
f5648f6db9
Notes:
blender-bot
2023-02-14 11:59:42 +01:00
Referenced by issue #36285, Viewport render first viewport scale wrong
|
@ -463,6 +463,7 @@ bool KX_Camera::GetFrustumCulling() const
|
|||
|
||||
void KX_Camera::EnableViewport(bool viewport)
|
||||
{
|
||||
InvalidateProjectionMatrix(false); // We need to reset projection matrix
|
||||
m_camdata.m_viewport = viewport;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue