gpt4 book ai didi

javascript - 帧率: relationship between FPS and MS (milliseconds needed to render a frame) in stats plugin

转载 作者:行者123 更新时间:2023-12-03 09:33:49 25 4
gpt4 key购买 nike

我正在使用 Stats.js 插件来监控我的 Three.js 性能。

FPS(最后一秒渲染的帧)和 MS(渲染一帧所需的毫秒数)信息似乎并不一致:

screenshot of stats.js plugin

根据我的计算,如果我需要 4 MS 来渲染一帧,那么我应该能够每秒渲染 1000 MS/4 MS = 250 帧,这远远超过了 RequestAnimationFrame 提供的,但比统计插件报告 17 FPS。

我错过了什么?

最佳答案

您需要更新版本的 stats.js。

您的屏幕刷新率为 60Hz(或可能为 59Hz)。这意味着平均为 16.67 毫秒/帧(或 59 Hz 为 16.95 毫秒/帧)。

您使用的脚本版本错误地将每帧的时间显示为 FPS,而不是每秒的帧数。

关于javascript - 帧率: relationship between FPS and MS (milliseconds needed to render a frame) in stats plugin,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31403035/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com