Minecraft 有一个很酷的特性用于加载纹理:它会将纹理加载到内存(RAM)中,然后上传至 GPU。
通常情况下,如果纹理不是动画的,Minecraft 就会将来自你内存中的 TextureData 删除。
但由于 Forge 的存在,这种情况不再发生。
这时这个模组就派上了用场。在所有内容加载完成后,它会遍历你的纹理管理器,并删除内存中所有非动画的精灵图(sprites),从而减少所占用的内存量。
对于原版或普通的 Forge 玩家来说,这并没有实际效果。
但通常整合包里的纹理数量会比平常多得多,我见过拥有 40,000 个纹理的整合包。我就以此作为最终示例:
1.10.2 版本的原版 Minecraft 中有 729 个(1.12 为 795 个)非动画纹理。
以下是节省内存的具体数据列表:
- 16x 纹理 = 每个纹理 1KB = 原版共 729KB = 5k 纹理时 5MB = 40k 纹理时 39MB
- 32x 纹理 = 每个纹理 4KB = 原版共 2.8MB = 5k 纹理时 20MB = 40k 纹理时 156MB
- 64x 纹理 = 每个纹理 16KB = 原版共 11MB = 5k 纹理时 78MB = 40k 纹理时 625MB
- 128x 纹理 = 每个纹理 66KB = 原版共 46MB = 5k 纹理时 312MB = 40k 纹理时 2.5GB
- 256x 纹理 = 每个纹理 262KB = 原版共 182MB = 5k 纹理时 1.2GB = 40k 纹理时 10GB
- 512x 纹理 = 每个纹理 1MB = 原版共 729MB = 5k 纹理时 5GB = 40k 纹理时 40GB
当然,这里假设每个纹理都是该特定大小,但即使混合使用不同大小的纹理,也能节省一些内存,因为这些数据已经存在于显存(GPU)中并被使用了!
此外,如果使用 Midmapping,这种效果可能会更加显著,因为 Minecraft 会创建重复的数据来生成这些映射。如果你使用了 Midmapping,那么预计可以节省更多的内存。(这部分尚未计入日志统计)
在纹理加载完成后,你会在该工具的日志中看到类似这样的信息:X 数量的纹理已被修复,节省了 Y MB(Z Bytes)的内存。
Minecraft has a cool feature for loading textures, it loads them into ram and then uploads them to the GPU,
what normally would happen after that is if the texture isn't animated mc would get rid of the TextureData from your Ram.
Thanks to forge this isn't a thing any more.
There comes this mod into play, after everything is loaded it goes over your texture manager and deletes all the none animate sprites from your ram to reduce the amount of Ram that is using.
For vanilla forge playing that has no real effect.
But usually modpacks have a lot more textures then usually, I have seen packs with 40k textures. I use that as an end example:
Vanilla mc has 729 (795 for 1.12) texture in 1.10.2 that are not animated.
So here is the list of how much that saves:
- 16x Textures = 1KB per Texture = 729KB in Vanilla = 5MB with 5k Textures = 39MB with 40k Textures,
- 32x Textures = 4KB per Texture = 2,8MB in Vanilla = 20MB with 5k Textures = 156MB with 40k Textures,
- 64x Textures = 16KB per Texture = 11MB in Vanilla = 78MB with 5k Textures = 625MB with 40k Textures,
- 128x Textures = 66KB per Texture = 46MB in Vanilla = 312MB with 5k Textures = 2,5GB with 40k Textures,
- 256x Textures = 262KB per Texture = 182MB in Vanilla = 1.2GB with 5k Textures = 10GB with 40k Textures,
- 512x Textures = 1MB per texture = 729MB in Vanilla = 5GB with 5k Textures = 40GB with 40k Textures
This assumes ofcourse that every texture is that spesific size but even if you have a mix inside of that you get a bit of memory saving, since that data is there and does nothing! It is already inside your GPU and its used there.
Also these effects can be greater if Midmapping is used, since mc creates duplicated data to generate these, if you use midmapping then expect a lot more memory being saved. (this is not counted log)
After the Textures are loaded there will be a log of this tool that say: X Amount of textures were fixed and you saved Y amount of MB (Z amount of Bytes)
评论 0
登录后参与评分
还没有评论,来抢沙发吧