Code/Framework/AzToolsFramework/Tests/Viewport/ViewportScreenTests.cpp
AZ::Vector2 ScreenNdcToWorldToScreenNdc(const AZ::Vector2& ndcPoint, const AzFramework::CameraState& cameraState)
    {
        const auto worldResult =
            AzFramework::ScreenNdcToWorld(ndcPoint, InverseCameraView(cameraState), InverseCameraProjection(cameraState));
        const auto ndcResult = AzFramework::WorldToScreenNdc(worldResult, CameraView(cameraState), CameraProjection(cameraState));
        return AZ::Vector3ToVector2(ndcResult);
    }
// transform a point from normalized device coordinates to world space, and then from world space back to normalized device coordinates
transform a point from normalized device coordinates to world space, and then from world space back to normalized device coordinates
transform a point from normalized device coordinates to world space and then from world space back to normalized device coordinates
AZ::Vector2 ScreenNdcToWorldToScreenNdc(const AZ::Vector2& ndcPoint, const AzFramework::CameraState& cameraState)
    {
        const auto worldResult =
            AzFramework::ScreenNdcToWorld(ndcPoint, InverseCameraView(cameraState), InverseCameraProjection(cameraState));
        const auto ndcResult = AzFramework::WorldToScreenNdc(worldResult, CameraView(cameraState), CameraProjection(cameraState));
        return AZ::Vector3ToVector2(ndcResult);
    }
AZ :: Vector2 ScreenNdcToWorldToScreenNdc ( const AZ :: Vector2 & ndcPoint , const AzFramework :: CameraState & cameraState ) { const auto worldResult = AzFramework :: ScreenNdcToWorld ( ndcPoint , InverseCameraView ( cameraState ) , InverseCameraProjection ( cameraState ) ) ; const auto ndcResult = AzFramework :: WorldToScreenNdc ( worldResult , CameraView ( cameraState ) , CameraProjection ( cameraState ) ) ; return AZ :: Vector3ToVector2 ( ndcResult ) ; }
transform a point from normalized device coordinates to world space, and then from world space back to normalized device coordinates
transform a point from normalized device coordinates to world space and then from world space back to normalized device coordinates