Better `rsqrt`
Replaces the constants Minecraft uses for their functions for calculating the reciprocal square root (aka rsqrt) with more accurate alternatives
介绍
Better rsqrt
N.B.: The accuracy benefits of this is negligible at best, so don’t expect anything big to happen. This is created
purely because I want to, and I can.
Tested to work every version since 1.14 (v1.0.1)
Replaces the constant Minecraft uses in their fast reciprocal square root
(also known as InvSqrt or rsqrt) functions, to yield better accuracy:
| Function | Original Value | More Accurate™ Value |
|———-|—————-|———————|
|fastInverseSqrt(float)| 0x5f3759df | 0x5f375a86|
|fastInverseSqrt(double)| 0x5fe6eb50c7b537aa | 0x5fe6eb50c7b537a9|
Since Minecraft only use these functions in rendering, this “fix” should not affect world generation or other functions
that rely on the vanilla result to yield expected results.
References
Both accessed on June 13th, 2021:
常见问题
Better `rsqrt` 支持哪些 Minecraft 版本?
Better `rsqrt` 支持 Minecraft Java 版 1.14–1.17,共 15 个版本,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。
Better `rsqrt` 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端 / 服务端。
评论
登录后评论和评分