Implement isFoggy();

In TU25, isFoggyAt is replaced with isFoggy for add foggy biomes
This commit is contained in:
GabsPuNs
2026-04-25 21:40:42 -04:00
parent e3e560449a
commit 7adf6ba04e
8 changed files with 2 additions and 59 deletions

View File

@@ -2243,19 +2243,6 @@ void GameRenderer::setupFog(int i, float alpha)
if (i == 999)
{
__debugbreak();
// 4J TODO
/*
glFog(GL_FOG_COLOR, getBuffer(0, 0, 0, 1));
glFogi(GL_FOG_MODE, GL_LINEAR);
glFogf(GL_FOG_START, 0);
glFogf(GL_FOG_END, 8);
if (GLContext.getCapabilities().GL_NV_fog_distance) {
glFogi(NVFogDistance.GL_FOG_DISTANCE_MODE_NV, NVFogDistance.GL_EYE_RADIAL_NV);
}
glFogf(GL_FOG_START, 0);
*/
return;
}
@@ -2346,14 +2333,8 @@ void GameRenderer::setupFog(int i, float alpha)
glFogf(GL_FOG_START, distance * 0.25f);
glFogf(GL_FOG_END, distance);
}
/* 4J - removed - TODO investigate
if (GLContext.getCapabilities().GL_NV_fog_distance)
{
glFogi(NVFogDistance.GL_FOG_DISTANCE_MODE_NV, NVFogDistance.GL_EYE_RADIAL_NV);
}
*/
if (mc->level->dimension->isFoggyAt(static_cast<int>(player->x), static_cast<int>(player->z)))
if (mc->level->getBiome(static_cast<int>(player->x), static_cast<int>(player->z))->isFoggy())
{
glFogf(GL_FOG_START, distance * 0.05f);
glFogf(GL_FOG_END, min(distance, 16 * 16 * .75f) * .5f);