Skip to content

Commit

Permalink
Fix fog color.
Browse files Browse the repository at this point in the history
  • Loading branch information
IntegratedQuantum committed Apr 30, 2022
1 parent 7016127 commit 0a100c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cubyz/rendering/MainRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,11 @@ public void render() {
if (ambient.x < 0.1f) ambient.x = 0.1f;
if (ambient.y < 0.1f) ambient.y = 0.1f;
if (ambient.z < 0.1f) ambient.z = 0.1f;
clearColor = Cubyz.world.getClearColor().mul(0.25f, new Vector4f());
clearColor = Cubyz.world.getClearColor();
Cubyz.fog.setColor(clearColor);
Cubyz.fog.setActive(ClientSettings.FOG_COEFFICIENT != 0);
Cubyz.fog.setDensity(1 / (ClientSettings.EFFECTIVE_RENDER_DISTANCE*ClientSettings.FOG_COEFFICIENT));
clearColor = clearColor.mul(0.25f, new Vector4f());

light.setColor(clearColor);

Expand Down

0 comments on commit 0a100c6

Please sign in to comment.