美文网首页
2022-07-13【Math】帧率平滑

2022-07-13【Math】帧率平滑

作者: 持刀的要迟到了 | 来源:发表于2022-07-12 19:42 被阅读0次

    Desmos | 图形计算器

    image.png
        /// <summary>
        /// 计算接收帧速率,该速率为本地认可的服务器真实平均帧速率
        /// </summary>
        //public static void CalculateServerRecvFps(this ClientInfo self)
        //{
        //    ClientInfo.c_ServerFpsFrmTimes[self.m_ServerFpsTimePointer] = Time.time;
        //    //Debug.LogError(">> " + m_ServerFpsTimePointer + " " + c_ServerFpsFrmTimes[m_ServerFpsTimePointer]);
    
        //    self.m_ServerFpsTimePointer++;
        //    if (self.m_ServerFpsTimePointer == ClientInfo.c_ServerFpsFrmcount)
        //    {
        //        self.m_ServerFpsTimePointer = 0;
        //    }
    
        //    if (self.serverFpsDataInited)
        //    {
        //        self.serverRecvTimeReal = (Time.time - ClientInfo.c_ServerFpsFrmTimes[self.m_ServerFpsTimePointer]) * ClientInfo.c_OneDivServerFpsFrmcount;
        //        //Debug.LogError(m_ServerFpsTimePointer + " " + c_ServerFpsFrmTimes[m_ServerFpsTimePointer]);
        //    }
        //    else
        //    {
        //        if (self.m_ServerFpsTimePointer == 0) self.serverFpsDataInited = true;
        //        self.serverRecvTimeReal = self.ServerSimulateTimeExpect;  // 没初始化好
        //    }
        //}

    相关文章

      网友评论

          本文标题:2022-07-13【Math】帧率平滑

          本文链接:https://www.haomeiwen.com/subject/yxytirtx.html