Added sky fog color option
This commit is contained in:
@@ -35,6 +35,15 @@ public enum FogDrawMode
|
||||
*/
|
||||
USE_OPTIFINE_SETTING,
|
||||
|
||||
/**
|
||||
* Replicates the effect of the clear sky mod
|
||||
* Makes the fog blend in with the sky way better
|
||||
* https://www.curseforge.com/minecraft/mc-mods/clear-skies
|
||||
* https://www.curseforge.com/minecraft/mc-mods/clear-skies-forge-port
|
||||
* For it to look good you need one of those mods
|
||||
*/
|
||||
USE_SKY_COLORS,
|
||||
|
||||
FOG_ENABLED,
|
||||
FOG_DISABLED
|
||||
}
|
||||
}
|
||||
|
||||
@@ -290,7 +290,13 @@ public class LodRenderer
|
||||
int cameraUniform = shaderProgram.getUniformLocation("cameraPos");
|
||||
shaderProgram.setUniform(cameraUniform, getTranslatedCameraPos());
|
||||
int fogColorUniform = shaderProgram.getUniformLocation("fogColor");
|
||||
Color fogColor = MC_RENDER.getFogColor();
|
||||
Color fogColor;
|
||||
if (CONFIG.client().graphics().fogQuality().getFogDrawMode() == FogDrawMode.USE_OPTIFINE_SETTING)
|
||||
fogColor = MC_RENDER.getFogColor();
|
||||
else if (CONFIG.client().graphics().fogQuality().getFogDrawMode() == FogDrawMode.USE_SKY_COLORS)
|
||||
fogColor = MC_RENDER.getSkyColor();
|
||||
else
|
||||
fogColor = new Color(0, 0, 0, 0);
|
||||
GL20.glUniform4f(fogColorUniform, fogColor.getRed() / 256.0f, fogColor.getGreen() / 256.0f, fogColor.getBlue() / 256.0f, fogColor.getAlpha() / 256.0f);
|
||||
|
||||
|
||||
|
||||
+1
@@ -136,6 +136,7 @@ public interface ILodConfigWrapperSingleton
|
||||
String FOG_DRAW_MODE_DESC = ""
|
||||
+ " When should fog be drawn? \n"
|
||||
+ " " + FogDrawMode.USE_OPTIFINE_SETTING + ": Use whatever Fog setting Optifine is using. If Optifine isn't installed this defaults to " + FogDrawMode.FOG_ENABLED + ". \n"
|
||||
+ " " + FogDrawMode.USE_SKY_COLORS + ": Use sky colors for the fog to make it blend in more \n"
|
||||
+ " " + FogDrawMode.FOG_ENABLED + ": Never draw fog on the LODs \n"
|
||||
+ " " + FogDrawMode.FOG_DISABLED + ": Always draw fast fog on the LODs \n";
|
||||
public FogDrawMode getFogDrawMode();
|
||||
|
||||
+2
@@ -50,6 +50,8 @@ public interface IMinecraftRenderWrapper
|
||||
public double getGamma();
|
||||
|
||||
public Color getFogColor();
|
||||
|
||||
public Color getSkyColor();
|
||||
|
||||
public double getFov(float partialTicks);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user