Gnetum
一款 Minecraft 模组,通过将 HUD 更新分散到多帧中来提升性能。
概述
Gnetum 将完整的 HUD 更新划分为多个“阶段”。每帧仅渲染一个阶段,从而减少 HUD 更新的耗时并提高 FPS。
根据每个元素的渲染时间,Gnetum 会自动将其更新分配到多帧中,从而同时提升平均 FPS 和最低 FPS。
技术说明
Gnetum 的设计思路是降低 HUD 的帧率。由于 HUD 渲染成本较高且变化并不频繁,降低其帧率可以在不牺牲整体游戏体验的前提下改善游戏性能,同时提升平均 FPS 和最低 FPS。具体实现方式如下:
- Gnetum 使用两个帧缓冲区,分别称为后帧缓冲区(back framebuffer)和前帧缓冲区(front framebuffer)
- 每一帧会渲染一个“阶段”,即完整 HUD 的一部分(可自定义),写入后帧缓冲区
- 例如,如果将阶段数设置为 4,则一次完整的 HUD 更新将被分散到 4 帧中完成,从而大幅减少每帧的绘制调用次数并提升 FPS
- 所有阶段渲染完成后,后帧缓冲区会与前端帧缓冲区进行“交换”
- 每帧还会渲染前帧缓冲区,其中包含完整 HUD 的纹理
此外,还有一个 HUD FPS 限制器,用于定义 HUD 的最大帧率。
配置
从 4.0.0 版本开始,支持与 Sodium Config API 集成。可通过视频设置界面访问配置,调整以下选项:
- 阶段数量
- HUD 最大帧率
- 为各个元素启用/禁用缓存
兼容性
1.20.1、1.21.1 与 1.21.11
✔️ ImmediatelyFast:完全兼容,推荐使用。
1.12.2
⚠️ OptiFine:请确保禁用“快速渲染”(否则本模组将不起作用。)
⚠️ StellarCore:请确保禁用其 HUD 缓存功能(如果你不确定如何禁用,可以忽略此项:默认情况下该功能已禁用。)
鸣谢
本模组灵感来源于 Moulberry 开发的 HUDCaching 模组。
Gnetum
A Minecraft mod that improves performance by distributing HUD updates over multiple frames.
Overview
Gnetum divides a full HUD update into multiple "passes." Only one pass is rendered each frame, reducing the time taken on HUD updates and improving FPS.
Based on the rendering time of each element, Gnetum automatically distributes their updates over multiple frames, improving both the average FPS and the minimum.
Technical explanations
The idea behind Gnetum is to reduce the framerate of the HUD, which is not cheap to render and does not really change often, to improve the overall performance of the game, in a way that improves both the average and the minimum FPS. To achieve this:
- Gnetum employs two framebuffers, called a back framebuffer and a front framebuffer, respectively
- Each frame will render a "pass", that is, a (customizable) portion of the complete HUD, to the back framebuffer
- If the number of passes is set to 4, for example, a full HUD update is distributed over 4 frames, saving a lot of draw calls every frame and improving FPS
- After all passes finish rendering, the back framebuffer is "swapped" with the front framebuffer
- Each frame also renders the front framebuffer, which contains a texture of the full HUD
There is also an HUD FPS limiter that defines the maximum FPS of the HUD.
Configuration
Starting from 4.0.0, integration is implemented with Sodium Config API. The configuration can be accessed from the Video Screen, allowing for adjustment of:
- the number of passes
- maximum HUD FPS
- enabling/disabling caching for each element
Compatibility
1.20.1, 1.21.1 & 1.21.11
✔️ ImmediatelyFast: fully compatible and recommended.
1.12.2
⚠️ OptiFine: make sure "Fast Render" is disabled (this mod would do nothing otherwise.)
⚠️ StellarCore: make sure their HUD Caching feature is disabled (if you are unsure how to disable it you can ignore this: it's disabled by default.)
Credits
This mod is inspired by the HUDCaching mod by Moulberry.
下载 Gnetum
下载 Gnetum
下载 Gnetum
下载 Gnetum
下载 Gnetum
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Gnetum
下载 Gnetum
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Gnetum
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Gnetum
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Gnetum
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
- 修复了在未渲染缓存 HUD 时不必要的物品颜色 Alpha 通道修改问题
- 修复了可能在解析配置文件时导致游戏崩溃的问题
修复了在解析配置文件时可能导致的崩溃问题。
- 修复了与最新 Fabric API 信息栏前景闪烁的问题
- 不向后兼容 - 请确保使用最新版本的 Fabric API!
- 进行了几处小改动,略微减少了内存占用
修复了 4.6.2 版本中因与 JourneyMap 兼容问题导致的游戏内路标图标变形的回归问题。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
评论 0
登录后参与评分
还没有评论,来抢沙发吧