Merge pull request #431 from jaquadro/fix-fog-render

Scale fog density to far plane distance.
This commit is contained in:
Adubbz 2015-03-21 19:24:15 +11:00
commit a32481419d
5 changed files with 5 additions and 6 deletions

View File

@ -117,7 +117,7 @@ public class FogHandler
float weightMixed = (distance * 2) * (distance * 2);
float weightDefault = weightMixed - weightBiomeFog;
float farPlaneDistance = (fpDistanceBiomeFog + event.farPlaneDistance * weightDefault) / weightMixed;
float farPlaneDistance = (fpDistanceBiomeFog * 240 + event.farPlaneDistance * weightDefault) / weightMixed;
float farPlaneDistanceScale = (0.25f * weightBiomeFog + 0.75f * weightDefault) / weightMixed;
fogX = entity.posX;

View File

@ -26,6 +26,6 @@ public class BiomeGenPolarChasm extends BOPNetherBiome implements IBiomeFog
public float getFogDensity(int x, int y, int z)
{
return 0.01F;
return 0.99F;
}
}

View File

@ -104,7 +104,6 @@ public class BiomeGenBambooForest extends BOPOverworldBiome implements IBiomeFog
public float getFogDensity(int x, int y, int z)
{
// TODO Auto-generated method stub
return 0.01F;
return 0.99F;
}
}

View File

@ -125,6 +125,6 @@ public class BiomeGenOminousWoods extends BOPOverworldBiome implements IBiomeFog
@Override
public float getFogDensity(int x, int y, int z)
{
return 10F;
return 0.1f;
}
}

View File

@ -119,6 +119,6 @@ public class BiomeGenTropicalRainforest extends BOPOverworldBiome implements IBi
public float getFogDensity(int x, int y, int z)
{
return 0.01F;
return 0.99F;
}
}