Tweakeroo

Tweakeroo

2M Downloads

disableRenderDistanceFog does not actually disable render distance fog

James103 opened this issue ยท 5 comments

commented

As of Tweakeroo version 0.10.0-dev.20210614.173711 and MaLiLib version 0.10.0+dev.22 for Minecraft 1.17, when you turn disableRenderDistanceFog on, it does not actually disable the render distance fog; just double the distance at which the fog starts and ends. Using another mod to do this (NoFog) actually does disable the render distance fog entirely, with only the camera limits to worry about.

private void disableRenderDistanceFog(int startCoords, float partialTicks, CallbackInfo ci)
{
if (DisableToggle.DISABLE_RENDER_DISTANCE_FOG.getBooleanValue())
{
float renderDistance = this.farPlaneDistance;
net.minecraft.client.renderer.GlStateManager.setFogStart(renderDistance * 1.6F);
net.minecraft.client.renderer.GlStateManager.setFogEnd(renderDistance * 2.0F);
}
}

commented

As of Minecraft 1.18, the default total world height is increased from 256 to 384 blocks. A render distance of 12 with disableRenderDistanceFog enabled results in fog covering the edges of the bottom of the rendered world. image

Reducing the render distance to 8 with disableRenderDistanceFog enabled results in fog covering the entire rendered world even at an altitude as low as 320 blocks above sea level (where both screenshots were taken), only allowing you to see basically the outline of the world (i.e. the topography at the edge of the rendered world). image

By setting the fog start and/or fog end values to 16.0F / 20.0F or even 160F / 200F, the dominant factor then becomes the camera's far plane limit (where anything beyond does not render even if loaded by the client), which is located at about 64 blocks away from the camera itself per chunk of render distance.

Hey How did you use 1.18?
what fabric loader what fabric api what version you got?

commented

Hey How did you use 1.18? what fabric loader what fabric api what version you got?

The actual Minecraft version used in the above screenshots is Minecraft 1.17, but I said 1.18 as the viewpoint where the above screenshots were taken coincides with the build height limit for 1.18.

commented

As a workaround, please use the No Fog pack from Vanilla Tweaks: https://vanillatweaks.net/share#luVgBn

If the above link doesn't work or if you want to combine with other packs, visit https://vanillatweaks.net/picker/resource-packs/, then scroll down until you see "Utility". Click that to expand the section, then click "No Fog". Add any other packs you want to combine in, then click "Download" on the sidebar to the right.

commented

Looks like NoFog does the exact same thing, modify the distances after vanilla sets them. It probably just uses a longer distance.

(Btw the mixin you linked is from the 1.12.2 LiteLoader branch... it's still the same principle in 1.17, but the class either changed at some point in vanilla or it's just called differently in Yarn, and the methods changed since then as well.)

I can change the values to be further away as well. But when do the current values not work? With really short or really long view distances?

commented

As of Minecraft 1.18, the default total world height is increased from 256 to 384 blocks. A render distance of 12 with disableRenderDistanceFog enabled results in fog covering the edges of the bottom of the rendered world.
image

Reducing the render distance to 8 with disableRenderDistanceFog enabled results in fog covering the entire rendered world even at an altitude as low as 320 blocks above sea level (where both screenshots were taken), only allowing you to see basically the outline of the world (i.e. the topography at the edge of the rendered world).
image

By setting the fog start and/or fog end values to 16.0F / 20.0F or even 160F / 200F, the dominant factor then becomes the camera's far plane limit (where anything beyond does not render even if loaded by the client), which is located at about 64 blocks away from the camera itself per chunk of render distance.