粒子碰撞加速
在编写 Methane 2.4 更新时,我发现粒子的光照和碰撞计算在某些条件下会占用大量 CPU 时间,且原因不明。为了解决这个问题,我在启用 Methane 时直接禁用了粒子的碰撞逻辑和光照。我一直打算将这个模组发布到 Modrinth,但直到最近才想起来……比预期晚了点。
这种光照优化是 Methane 的一个特性,尽管 Particle Core 也为粒子优化了光照(它并非完全移除整个系统,而是为了换取稍好的性能)。
虽然这使得粒子“更优化”,但也意味着所有粒子碰撞都不再被计算。大多数情况下这并不可察觉,但原本应该附着在表面上的粒子将不再具备此功能。此外,少数其他小效果也会显得奇怪或无法正常工作。
依赖此行为的模组要么无法正常运行,要么直接崩溃(不过,极少有模组会在粒子碰撞上运行代码)。
如果你不需要由此带来的性能提升,建议直接使用 Particle Core。
值得注意的是,最近 Lunar Client 不知出于何种原因也使用了与 Methane 相同的补丁。在使用 Lunar Client 的同时加载本模组会导致崩溃,并使 Methane 禁用此项优化。我不知道他们为什么这么做。
"Faster" Particle Collisions
Originally when writing Methane's 2.4 update, I found that particle lighting and collision calculations took up a lot of CPU time in certain conditions for seemingly no reason. To fix this, I outright disabled collision logic and lighting for particles when Methane was on. I've been meaning to throw this on modrinth for a while, and remembered to do it... a little later than expected.
The lighting hack is very much a feature of Methane, although Particle Core optimizes lighting for particles (instead of throwing out the whole system for a bit more performance).
While this makes particles "more optimized", it also means that all particle collisions are not calculated. Most of the time this is not noticable, but particles that are meant to stick to surfaces will not do so anymore. A handful of other small effects will also look odd, or not work properly.
Mods that depend on this behaviour will either not work correctly or outright crash (although running code on particle collisions is very uncommon for mods to do).
If you don't need the performance boost from this, you should settle for just Particle Core.
It's worth noting that as of recently, Lunar Client has for whatever reason used the same patch that Methane uses. Using Lunar with this mod will cause a crash, and make Methane disable this optimization. I have no idea why they did this.
评论 0
登录后参与评分
还没有评论,来抢沙发吧