CompressedBlockAssets.java causing texturing slowdown on load
mindcloud69 opened this issue ยท 5 comments
Minecraft Version: 1.12.2
Overloaded Version: 1.12.2-0.0.53
Your scaling of the texture for your compressed blocks is not a power of 2 which is causing some issues and slow downs in minecraft. Especially for people with optifine installed.
81# int scale = 1 + locations.compressionAmount;
I would suggest altering your texture scaling to always come out to a power of 2. i.e. 16,32,64,128,256
My understanding is textures that are not a power of 2 can affect mipmaping negatively and will cause slowdowns.
You can force them all to be powers of two by setting the max resolution to be something small and also power of two (its 256 by default).
Minecraft (at least with vanilla + forge) uses a single stitched texture sheet with pre-generated mipmaps. You can see what your current texture sheet size is in the log by looking for textures-atlas
.
If you can show that modifying them to all be powers of two will actually help I will made the edit but during my testing saw no difference performance wise, but it ends up using more texture space which is a limited resource (Max texture size
in log is your computer's maximum)/
That simple test for a normal texture pack pick: Place down a bunch of x7 (112x112 texture, ie 16 * 7) and wait for chunk updates to equal zero check fps. Replace with x8 (128x128 texture, ie 16 * 8) and if the FPS goes up it is better to be power of two. On my computer it had no effect.
I will need to dig up some information for you but as I remember it had to do with opengl and lwjgl. It caused performance glitches and visual issues with mipmapping enabled.
I found a comment by sp614x the optifine dev sp614x/optifine#1961 (comment) that explains the issue with mipmapping in vanilla minecraft. Basically if there are non power of 2 textures mipmapping is disabled by default in minecraft, optifine fixes this by resizing textures so you can enable mipmapping.
If this isn't an issue you observed or can recreate there is nothing I am going to do. Also forge for a few years has had mipmaping on for everything MinecraftForge/MinecraftForge#3087