使用可扩展 API 完全替换 Minecraft 光照引擎,并附带 Phosphor 作为参考实现。
依赖项
性能
主要性能提升源于光照引擎采用“惰性”求值方式,从而能够将更多光照更新批处理到单次传递中。
以下是通过配置文件测试用例生成的易于理解的数值:
测试用例
- 世界类型:默认
- 世界种子:123
- 游戏模式:创造
- 渲染距离:16
分析器在点击“创建新世界”前启动,并在创造模式下直线飞行 10 秒后停止。
不使用 Lumi 时,活跃服务器时间中用于光照引擎的时间占总活跃服务器时间的 34%(不包括服务器线程休眠的时间)。
使用 Lumi 后,该比例降至 13%,即相比原版性能提升了约 2.5 倍。
火焰图
水平轴表示时间,垂直轴表示调用栈。蓝色高亮部分表示对光照引擎更新方法的调用。


不兼容项
- ArchaicFix: 需要更改配置
- 由于两个模组都替换了相同的代码部分,自然你需要在 ArchaicFix 配置中将
enablePhosphor设置为false。
- 由于两个模组都替换了相同的代码部分,自然你需要在 ArchaicFix 配置中将
- CoreTweaks: 需要更改配置
fix_heightmap_range功能已在 Lumi 的光照引擎中实现。请在 CoreTweaks 配置中将其设置为false。
当你启动游戏时,Lumi 会自动修改这两个配置,因此你甚至无需手动编辑配置文件。
作者
鸣谢
- embeddedt
- 将 Phosphor 移植到 1.7.10 的初始工作
- CaffeineMC
- 创建原始 Phosphor
A full replacement of the Minecraft lighting engine with an extendable API, shipping with Phosphor as a reference implementation.
Dependencies
Performance
The main performance improvement comes from the fact that the lighting engine is evaluated "lazily", thus it is able to batch more lighting updates into a single pass.
Here are some simple to understand values, generated via profiling a pre-set test case:
Test Case
- World Type: Default
- World Seed: 123
- Game Mode: Creative
- Render Distance: 16
Profiler is started right before clicking Create New World, and stopped after 10 seconds of flying in a straight line in creative mode.
Without Lumi, the active server time spent in lighting engine is 34% of the total active server time (not counting when the server thread is sleeping).
With Lumi, this fraction goes down to 13%, or an approximately 2.5x performance increase over vanilla.
Flame Graphs
Horizontal axis is time, vertical axis is the call stack. The blue highlighted parts are calls to the lighting engine update method.


Incompatibilities
- ArchaicFix: Config Change Needed
- As both mods replace the same parts of code, naturally you will need to set
enablePhosphortofalsein the ArchaicFix config.
- As both mods replace the same parts of code, naturally you will need to set
- CoreTweaks: Config Change Needed
- The
fix_heightmap_rangefeature is already implemented in Lumi's lighting engine. Set it tofalsein the CoreTweaks config.
- The
Both of these configs will be automatically modified by Lumi automatically when you launch the game, so you shouldn't even need to edit the config files manually.
Authors
Credits
- embeddedt
- The initial port of Phosphor into 1.7.10
- CaffeineMC
- Creating the original Phosphor
下载 Lumi Lighting Engine Optimizer
下载 Lumi Lighting Engine Optimizer
下载 Lumi Lighting Engine Optimizer
下载 Lumi Lighting Engine Optimizer
下载 Lumi Lighting Engine Optimizer
下载 Lumi Lighting Engine Optimizer
下载 Lumi Lighting Engine Optimizer
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
缓冲的原始输入和线程化的事件轮询
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
原版世界生成优化模组
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
评论 0
登录后参与评分
还没有评论,来抢沙发吧