Hydrogen
它会向 Windows、Linux 或 macOS 查询你的 CPU 信息,向显卡驱动询问实际存在的 VRAM 容量,向 GLFW 获取你的显示器刷新率和 DPI 缩放比例。随后它会对游戏进行五秒基准测试,并根据测量结果计算各项阈值。一台 4K 60Hz 的电脑和一台 1080p 240Hz 的电脑最终会获得完全不同的设置,而你无需打开任何配置文件。
功能说明
将线程放置在合适的核心上。Hydrogen 读取你真实的 CPU 拓扑结构,包括第 12 代及更新 Intel 处理器的 P-core 和 E-core 布局,以及所有超线程兄弟核心。渲染线程会被固定到最快的物理核心上,而区块网格构建则使用其余核心。区块构建绝不应落在正在绘制你等待帧的核心上。
在帧时间紧张时请求更高的时钟频率。你的显示器设定了目标值:144Hz 意味着 6.94ms。当帧时间超出限制时,Hydrogen 会将 Windows 电源计划切换为“高性能”,或在 Linux 上将 performance 写入 cpufreq governor,并在情况稳定后恢复原状。使用电池供电时,它不会打扰你。如果你的机器确实无法达到面板的刷新率,它会注意到这一点并转向一个合理的分频值,而不是永远追逐某个数字。
将垃圾回收移出你的视线。垃圾回收被提前到你几乎感觉不到的时刻,例如静止不动、打开物品栏或暂停游戏。如果你在最近的六秒内挥动了剑,它就不会进行任何操作。堆内存首先达到多满取决于它在你设备上测量的分配速率。
缩放世界,而非 HUD。当 GPU 落后或 VRAM 填满时,3D 世界会以更小的尺寸渲染,然后再放大回来。你的 HUD、文本、准星和菜单随后以完整的原生分辨率绘制并保持清晰。你设定的下限会被绝对尊重。如果设置 drs.minScale=0.70,无论发生什么情况,最低也不会低于 70%。
在驱动程序恐慌之前清除 VRAM。空闲和总内存直接来自驱动程序。阈值跟随显卡变化,因此一张 2GB 的显卡会在 85% 时开始清除,而一张 12GB 的显卡则在 94% 时开始清除。图集(Atlases)永远不会被触碰,只有游戏可以按需重新上传的纹理才会被处理。如果没有驱动程序扩展报告内存,该功能会自动关闭,而不是猜测。
停止绘制小于一个像素的物体。投影面积小于一个物理像素的实体永远不会到达驱动程序。阈值跟随你的 DPI 缩放比例,因此 150% 的 Windows 缩放需要 1.5 个设备像素才算作有效对象。
在你注视的方向构建区块。你的视角方向和移动构成一个前向向量,60 度锥体内的地形优先构建。在 1.21.9+ 版本中,这只是对游戏自身队列已排序的距离所做的微小更改,因此 Mojang 的调度逻辑保持不变。
五秒基准测试
当你首次加载世界时,Hydrogen 会丢弃一秒钟的加载帧,并在所有自适应功能关闭的情况下观察接下来的五秒。它记录帧百分位数、抖动、分配变化和 VRAM 增长,然后推导出其阈值。运行期间不绘制任何内容,也不改变任何设置。如果你更改分辨率或显示器,它会重新运行测试。
GT 1030 在 1440p 下的真实输出:
Hydrogen: NVIDIA GeForce GT 1030 (2.0 GB via NVX_gpu_memory_info) | 2560x1440 @ 144Hz
Hydrogen: baseline p50 7.72ms p95 19.07ms jitter 7.46ms churn 569MB/s headroom 0.36x
Hydrogen: tuned to target 13.89ms stall 18.75ms | drs 0.70-1.00 step 0.040 | vram evict 85%
Headroom 为 0.36 意味着 144Hz 根本不可能实现,因此它重新定位到 72Hz,并让分辨率缩放完成剩余的工作。
与你已有的模组兼容
Sodium、Iris、VulkanMod 和 C2ME 均可正常工作。安装了 Sodium 时,由于 Sodium 拥有自己的调度器,Hydrogen 的原版区块排序功能会自动关闭,而其他功能继续运行。使用 VulkanMod 时,由于没有 GL framebuffer 可供重定向,分辨率缩放功能会关闭,但 CPU 和 GC 功能仍保持工作。Hydrogen 永远不会替换他人的渲染器或光影。它只是在它们周围读取指标。
配置
你可以在 config/hydrogen.properties 找到配置文件。几乎所有值都默认为 auto。将其中的一个值替换为具体数字,该值就会被固定,而其他值继续自动调整。
drs.minScale=0.70 # 世界缩放不得低于此值
target.frameTimeMs=auto # 设置为 16.7 以简单 targeting 60fps
cpu.governor.allowPowerPlanSwitch=auto # auto = 仅限交流电源
log.verbose=false # 记录每次调整决策
诚实的限制
在 1.21.9+ 和 26.x 版本中,分辨率缩放使用新的 Blaze3D API,该 API 在快照之间仍在变化。它已实现,但需通过 drs.allowNewBlaze3d=true 显式启用。在 1.20.x 和 1.21.1 版本中,它是默认启用的。
Chunk deferral(区块延迟构建)在 26.x 版本中不可用,因为该版本重新设计了区块失效的方式。锥形优先级在此版本中仍然有效。
分辨率缩放与 Fabulous 画质不兼容。如果你使用 Fabulous,请将其关闭。
目前还没有设置 GUI,只有配置文件。
如果原生线程固定被拒绝、电源 governor 不可写,或者你的驱动程序未报告 VRAM 扩展,受影响的特性会安静地降级并仅记录一次日志。不会崩溃,也不会刷屏控制台。
1.0.0 版本更新日志
首次发布。
新增:
- 从操作系统读取你真实的 P 核、E 核和 SMT 布局,以确保区块网格生成不在渲染线程核心上进行。
- 根据显示器的实际刷新率调整时钟频率,若需要则在 Linux 上无需 root 权限即可提升时钟频率。
- 将垃圾回收移至空闲时段进行。在战斗期间锁定垃圾回收,并根据你测量的分配率设置堆内存触发阈值。
- 缩放 3D 世界同时保持 HUD 处于原生分辨率。你配置的最低缩放比例绝不会突破。
- 根据显卡实际大小(由驱动程序报告而非假设)使用阈值清理显存。
- 停止绘制小于物理像素的实体,遵循你的 DPI 缩放和实时视口设置。
- 基于你的移动方向,优先构建前方 60 度锥形区域内的区块。
- 在世界加入时运行五秒校准过程,通过测量的帧时间、抖动和分配波动来推导各项阈值。
兼容 Sodium、Iris、VulkanMod 和 C2ME。冲突的钩子会自动禁用自身。
已知限制包括:在 1.21.9+ 和 26.x 版本中,分辨率缩放为可选功能,直到新的 Blaze3D API 稳定为止;26.x 版本暂不支持区块延迟加载。目前尚无设置界面。
Hydrogen
It asks Windows, Linux, or macOS to describe your CPU. It asks your graphics driver how much VRAM actually exists. It asks GLFW what your monitor runs at and what your DPI scaling is. Then it benchmarks your game for five seconds and works out every threshold from what it measured. A 4K 60Hz computer and a 1080p 240Hz computer end up with completely different settings and neither of you opens a config file.
What it does
Puts your threads on the right cores. Hydrogen reads your real CPU topology, including P-core and E-core layout on 12th gen Intel and newer, and hyperthread siblings everywhere. Your render thread gets pinned to the fastest physical cores. Chunk meshing gets everything else. A chunk build should never land on the core drawing the frame you're waiting for.
Asks for clocks when frames get tight. Your monitor sets the target. 144Hz means 6.94ms. When frames overrun it, Hydrogen switches the Windows power plan to High Performance, or writes performance to the Linux cpufreq governor, and puts it back when things settle. On battery it leaves you alone. And if your machine genuinely can't reach your panel's refresh rate, it notices and aims at a sensible divisor instead of chasing a number forever.
Moves garbage collection out of your way. Collections get pulled forward into moments you won't feel them, like standing still, opening your inventory, or pausing the game. If you swung a sword in the last six seconds, it won't touch anything. How full the heap gets first depends on the allocation rate it measured on your setup.
Scales the world, not the HUD. When the GPU falls behind or VRAM fills, the 3D world renders smaller and gets scaled back up. Your HUD, text, crosshair and menus draw afterwards at full native resolution and stay sharp. You set the floor and it is respected absolutely. A setting of drs.minScale=0.70 will never go below 70%, whatever happens.
Clears VRAM before the driver panics. Free and total memory come straight from the driver. Thresholds follow the card, so a 2GB GPU starts clearing at 85% and a 12GB one at 94%. Atlases are never touched, only textures the game can re-upload on demand. If no driver extension reports memory, the feature switches itself off instead of guessing.
Stops drawing things smaller than a pixel. Entities that project to less than one physical pixel never reach the driver. The threshold follows your DPI scaling, so 150% Windows scaling needs 1.5 device pixels before something counts.
Builds chunks where you're looking. Your view direction and movement make a forward vector, and terrain inside a 60 degree cone gets built first. On 1.21.9+ this is one small change to the distance the game's own queue already sorts by, so Mojang's scheduling logic stays intact.
The five second benchmark
The first time you load a world, Hydrogen discards a second of loading frames and watches the next five with everything adaptive switched off. It records frame percentiles, jitter, allocation churn and VRAM growth, then derives its thresholds. Nothing is drawn and nothing changes while it runs. It re-runs if you change resolution or monitor.
Real output from a GT 1030 at 1440p:
Hydrogen: NVIDIA GeForce GT 1030 (2.0 GB via NVX_gpu_memory_info) | 2560x1440 @ 144Hz
Hydrogen: baseline p50 7.72ms p95 19.07ms jitter 7.46ms churn 569MB/s headroom 0.36x
Hydrogen: tuned to target 13.89ms stall 18.75ms | drs 0.70-1.00 step 0.040 | vram evict 85%
Headroom of 0.36 means 144Hz was never happening, so it retargeted to 72 and let resolution scaling do the rest.
Works with what you already run
Sodium, Iris, VulkanMod and C2ME all work fine. With Sodium installed, Hydrogen's vanilla chunk ordering switches itself off because Sodium has its own scheduler, and everything else carries on. With VulkanMod, resolution scaling switches off because there is no GL framebuffer to redirect, and the CPU and GC features keep working. Hydrogen never replaces anyone's renderer or shaders. It reads metrics around them.
Configuration
You can find the config at config/hydrogen.properties. Almost every value says auto. Replace one with a number and that value is pinned while everything else keeps tuning itself.
drs.minScale=0.70 # never scale the world below this
target.frameTimeMs=auto # set 16.7 to simply target 60fps
cpu.governor.allowPowerPlanSwitch=auto # auto = AC power only
log.verbose=false # log every tuning decision
Honest limits
Resolution scaling on 1.21.9+ and 26.x uses the new Blaze3D API, which is still changing between snapshots. It is implemented but opt-in behind drs.allowNewBlaze3d=true. On 1.20.x and 1.21.1 it is on by default.
Chunk deferral isn't available on 26.x, because that version reworked how sections get invalidated. Cone prioritisation still works there.
Resolution scaling doesn't mix with Fabulous graphics. Leave it off if you use Fabulous.
There is no settings GUI yet, only the config file.
If native thread pinning is denied, the power governor isn't writable, or your driver reports no VRAM extension, the affected feature degrades quietly and logs once. Nothing crashes and nothing spams your console.
Changelog for version 1.0.0
First release.
Adds:
- Reads your real P-core, E-core and SMT layout from the OS to keep chunk meshing off the render thread cores.
- Adjusts clock speeds based on your monitor's actual refresh rate, lifting clocks without root on Linux if needed.
- Moves garbage collection into idle moments. It locks out during combat and sets heap triggers based on your measured allocation rate.
- Scales the 3D world while keeping the HUD at native resolution. Your configured floor is never crossed.
- Clears VRAM using thresholds that follow your card's actual size, reported by the driver rather than assumed.
- Stops drawing entities smaller than a physical pixel, following your DPI scaling and live viewport.
- Prioritises building chunks in a 60 degree forward cone based on your movement.
- Runs a five second calibration pass on world join to derive thresholds from measured frame times, jitter and allocation churn.
Compatible with Sodium, Iris, VulkanMod and C2ME. Conflicting hooks disable themselves automatically.
Known limits include resolution scaling being opt-in on 1.21.9+ and 26.x while the new Blaze3D API settles. Chunk deferral is unavailable on 26.x. There is no settings GUI yet.
下载 Hydrogen Performance
下载 Hydrogen Performance
下载 Hydrogen Performance
下载 Hydrogen Performance
下载 Hydrogen Performance
下载 Hydrogen Performance
下载 Hydrogen Performance
下载 Hydrogen Performance
下载 Hydrogen Performance
下载 Hydrogen Performance
暂无更新日志
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
缓冲的原始输入和线程化的事件轮询
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
原版世界生成优化模组
评论 0
登录后参与评分
还没有评论,来抢沙发吧