Merge pull request #431 from jaquadro/fix-fog-render
Scale fog density to far plane distance.
This commit is contained in:
commit
a32481419d
|
@ -117,7 +117,7 @@ public class FogHandler
|
||||||
float weightMixed = (distance * 2) * (distance * 2);
|
float weightMixed = (distance * 2) * (distance * 2);
|
||||||
float weightDefault = weightMixed - weightBiomeFog;
|
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;
|
float farPlaneDistanceScale = (0.25f * weightBiomeFog + 0.75f * weightDefault) / weightMixed;
|
||||||
|
|
||||||
fogX = entity.posX;
|
fogX = entity.posX;
|
||||||
|
|
|
@ -26,6 +26,6 @@ public class BiomeGenPolarChasm extends BOPNetherBiome implements IBiomeFog
|
||||||
|
|
||||||
public float getFogDensity(int x, int y, int z)
|
public float getFogDensity(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 0.01F;
|
return 0.99F;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,6 @@ public class BiomeGenBambooForest extends BOPOverworldBiome implements IBiomeFog
|
||||||
|
|
||||||
public float getFogDensity(int x, int y, int z)
|
public float getFogDensity(int x, int y, int z)
|
||||||
{
|
{
|
||||||
// TODO Auto-generated method stub
|
return 0.99F;
|
||||||
return 0.01F;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,6 +125,6 @@ public class BiomeGenOminousWoods extends BOPOverworldBiome implements IBiomeFog
|
||||||
@Override
|
@Override
|
||||||
public float getFogDensity(int x, int y, int z)
|
public float getFogDensity(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 10F;
|
return 0.1f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,6 +119,6 @@ public class BiomeGenTropicalRainforest extends BOPOverworldBiome implements IBi
|
||||||
|
|
||||||
public float getFogDensity(int x, int y, int z)
|
public float getFogDensity(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 0.01F;
|
return 0.99F;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue