Merge branch 'upstream/stabilization/2106' into genewalt/gitflow_210628

This commit is contained in:
Gene Walters
2021-06-28 19:09:20 -07:00
18674 changed files with 87627 additions and 179297 deletions
+12 -11
View File
@@ -1,14 +1,9 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
* Copyright (c) Contributors to the Open 3D Engine Project
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include <Atom/RPI.Public/View.h>
#include <Atom/RHI/RHISystemInterface.h>
@@ -160,13 +155,19 @@ namespace AZ
0,0,1,0,
0,0,0,1 };
yUpWorld.StoreToRowMajorFloat12(viewToWorldMatrixRaw);
const AZ::Matrix4x4 prevViewToWorldMatrix = m_viewToWorldMatrix;
m_viewToWorldMatrix = AZ::Matrix4x4::CreateFromRowMajorFloat16(viewToWorldMatrixRaw);
m_worldToViewMatrix = m_viewToWorldMatrix.GetInverseFast();
m_worldToClipMatrix = m_viewToClipMatrix * m_worldToViewMatrix;
m_onWorldToViewMatrixChange.Signal(m_worldToViewMatrix);
// Only signal an update when there is a change, otherwise this might block
// user input from changing the value.
if (!prevViewToWorldMatrix.IsClose(m_viewToWorldMatrix))
{
m_onWorldToViewMatrixChange.Signal(m_worldToViewMatrix);
}
m_onWorldToClipMatrixChange.Signal(m_worldToClipMatrix);
InvalidateSrg();