diff --git a/src/main/java/net/minecraft/client/render/LightmapHelper.java b/src/main/java/net/minecraft/client/render/LightmapHelper.java
index 9ec4299b9..108a009cd 100644
--- a/src/main/java/net/minecraft/client/render/LightmapHelper.java
+++ b/src/main/java/net/minecraft/client/render/LightmapHelper.java
@@ -8,6 +8,7 @@ import java.nio.ByteBuffer;
 
 import net.minecraft.client.GLAllocation;
 import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.GuiPhotoMode;
 import net.minecraft.client.option.enums.LightmapStyle;
 import net.minecraft.client.util.helper.Textures;
 import net.minecraft.core.util.helper.Buffer;
@@ -166,7 +167,9 @@ public class LightmapHelper {
 			
 			if(smooth) {
 				float skyDarken = prevSkyDarken + (skyDarkenSmooth - prevSkyDarken) * partialTicks;
-				
+				if(mc.currentScreen instanceof GuiPhotoMode) {
+					skyDarken = world.skyDarken;
+				}
 				float modifiedSkylight = Math.max(0, skyLightLevel - skyDarken);
 				float light = Math.max(blockLightLevel, modifiedSkylight);
 				brightness = MathHelper.getInterpolate(world.worldType.getBrightnessRamp(), light);
diff --git a/src/main/java/net/minecraft/client/render/shader/ShadersRenderer.java b/src/main/java/net/minecraft/client/render/shader/ShadersRenderer.java
index 6a3e0ea67..7f67c2414 100644
--- a/src/main/java/net/minecraft/client/render/shader/ShadersRenderer.java
+++ b/src/main/java/net/minecraft/client/render/shader/ShadersRenderer.java
@@ -17,7 +17,9 @@ import net.minecraft.client.render.Framebuffer;
 import net.minecraft.client.render.OpenGLHelper;
 import net.minecraft.client.render.Renderer;
 import net.minecraft.client.render.Texture;
+import net.minecraft.client.render.camera.CameraUtil;
 import net.minecraft.core.Global;
+import net.minecraft.core.block.material.Material;
 
 public class ShadersRenderer implements Renderer {
 
@@ -110,6 +112,9 @@ public class ShadersRenderer implements Renderer {
 		if(mc.gameSettings.clouds.value && mc.gameSettings.fancyGraphics.value == 1 && cloudsShader.isEnabled()) {
 			OpenGLHelper.checkError("pre setup clouds");
 			
+			// Alpha test is implemented in the shader because regular alpha test removes some pixels at the edge
+			glDisable(GL_ALPHA_TEST);
+			
 			cloudsShader.bind();
 			
 			// Read projection matrix, invert it, and send it to the shader
@@ -128,6 +133,16 @@ public class ShadersRenderer implements Renderer {
 			matrixBuffer.limit(16);
 			glUniformMatrix4(cloudsShader.getUniform("gbufferProjectionInverse"), false, matrixBuffer);
 			
+			int isEyeInLiquid;
+			if(CameraUtil.isUnderLiquid(mc.activeCamera, mc.theWorld, Material.lava, partialTicks)) {
+				isEyeInLiquid = 2;
+			}else if(CameraUtil.isUnderLiquid(mc.activeCamera, mc.theWorld, Material.water, partialTicks)) {
+				isEyeInLiquid = 1;
+			}else {
+				isEyeInLiquid = 0;
+			}
+			glUniform1i(cloudsShader.getUniform("isEyeInLiquid"), isEyeInLiquid);
+			
 			glUniform1f(cloudsShader.getUniform("viewWidth"), renderWidth);
 			glUniform1f(cloudsShader.getUniform("viewHeight"), renderHeight);
 			
@@ -138,6 +153,7 @@ public class ShadersRenderer implements Renderer {
 	@Override
 	public void endRenderClouds(float partialTicks) {
 		glUseProgram(0);
+		glEnable(GL_ALPHA_TEST);
 	}
 
 	@Override
diff --git a/src/main/resources/shaders/clouds.fsh b/src/main/resources/shaders/clouds.fsh
index a6ce4841b..b246f1317 100644
--- a/src/main/resources/shaders/clouds.fsh
+++ b/src/main/resources/shaders/clouds.fsh
@@ -5,6 +5,8 @@
 
 uniform sampler2D texture;
 
+uniform int isEyeInLiquid;
+
 #ifdef RADIAL_FOG
 uniform mat4 gbufferProjectionInverse;
 uniform float viewWidth;
@@ -15,6 +17,18 @@ varying vec2 texcoord;
 varying vec4 color;
 
 void main() {
+	vec4 tex = texture2D(texture, texcoord);
+	
+	// Alpha test
+	if(tex.a < 0.1f) {
+		discard;
+	}
+	
+	// Hide clouds when in water or lava
+	if(isEyeInLiquid != 0) {
+		discard;
+	}
+	
 	vec4 col = color;
 	
 	#ifdef FOG
@@ -40,5 +54,5 @@ void main() {
 	col.a *= 1.0f - fogStrength;
 	#endif
 	
-	gl_FragData[0] = texture2D(texture, texcoord) * col;
+	gl_FragData[0] = tex * col;
 }
\ No newline at end of file
