Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import net.minecraft.server.packs.resources.ResourceManager;
import net.minecraft.server.packs.resources.ResourceProvider;
import net.minecraft.util.Mth;
import net.minecraft.world.level.material.FogType;
import net.minecraft.world.phys.Vec3;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
Expand Down Expand Up @@ -63,6 +64,10 @@ public void render(Camera camera,
return;
}

if (camera.getFluidInCamera() == FogType.LAVA) {
return;
}

Vec3 pos = camera.getPosition();

double cloudTime = (ticks + tickDelta) * 0.03F;
Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/assets/minecraft/shaders/core/clouds.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ void main() {

float width = FogEnd - FogStart;
float newWidth = width * 4.0;

float fade = linear_fog_fade(vertexDistance, FogStart, FogStart + newWidth) * FogColor.a;
fragColor = vec4(mix(FogColor.rgb, color.rgb, 0.7), clamp(color.a * fade, 0.0, 1.0));
vec4 finalColor = vec4(mix(FogColor.rgb, color.rgb, 0.7), clamp(color.a * fade, 0.0, 1.0));
fragColor = linear_fog(finalColor, vertexDistance, FogStart, FogEnd, FogColor);
}