It seems that the way fog works in the nether is that the fog distance is something like:
min(6, renderDistance / 2)
Which means that even if the render distance is 8, you only get to see 4 chunks out. That means you're rendering 4x as many chunks as you can see.
There are 2 possible fixes:
If the intention is that the nether is always more constrained than the render distance you're used to in the overworld, make the actual render distance used in the nether around half of what the render distance slider is, but keep the fog distance how it is, so that the performance is optimal without changing how it looks.
Make the fog distance in the nether use something like: min(6, max(renderDistance / 2, renderDistance - 2)), (the minus 2 or so to counter pop-in), as halving what's visible wastes performance by rendering a lot of chunks that you can't see. Additionally the actual render distance in the nether should be something like: min(8, renderDistance)
Attachments
Comments 4
Go to the nether, set the render distance to 13 (which will max out the visible fog distance), take note of the FPS, then change the render distance to 32, and take note of the FPS. In my case, the difference is 80 to 27.
[media][media]
The reason I found out about this:
With a constant render distance, performance in the nether is comparable to performance in the overworld, despite significantly fewer chunks being visible.
https://www.minecraftforum.net/forums/minecraft-java-edition/suggestions/2804216-fix-nether-fog-improve-performance-and-appearance
The sodium fabric mod has the setting "Use Fog Occlusion". My FPS at 32 chunks render distance is 237 with it enabled, and 62 without it. I doubt that sodium would introduce such a performance issue that vanilla minecraft doesn't have.
In optifine, disabling fog greatly increases the distance you can see.
Yeah, vanilla doesn't have such a thing as fog occlusion afaik, i recall this happening with reduced fog effects like blindness, underwater (partially) or other situations. However in the nether this seems to be the most noticeable, and is also an issue due to how the dimension fog is capped at 13 chunks (MC-68535).
1552 chunk sections w/ 13 render distance:
[media][media]
3205 chunk sections w/ 20 render distance (visually the same):
[media][media]
I'd say that this specific issue could be fixed even without implementing fog occlusion, should the server only send the actually visible chunks to the client so this way it doesn't end up rendering more than necessary. This might also change a controversial situation, where modded clients are able to remove the nether fog and get more visible terrain compared to vanilla clients on servers, but whether or not that's something they want to fix is up to them.
Fog occlusion seems like the best solution. It would be difficult to implement a special rule for the nether without making dimension fog settings in datapacks more complicated or counterintuitive, and fog occlusion could also benefit the end during the dragon fight as well as any potential future scenarios where the dimension fog is relatively close in.
Is there any way to demonstrate this in-game or a code analysis?