From 6628324d7e95e55aaf05291d30e946c5460b5610 Mon Sep 17 00:00:00 2001 From: douira Date: Sun, 24 Nov 2024 04:11:39 +0100 Subject: [PATCH] don't force terrain update every frame in shadow pass --- .../java/net/irisshaders/iris/shadows/ShadowRenderer.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/common/src/main/java/net/irisshaders/iris/shadows/ShadowRenderer.java b/common/src/main/java/net/irisshaders/iris/shadows/ShadowRenderer.java index 2044a1b724..c986fee490 100644 --- a/common/src/main/java/net/irisshaders/iris/shadows/ShadowRenderer.java +++ b/common/src/main/java/net/irisshaders/iris/shadows/ShadowRenderer.java @@ -440,13 +440,7 @@ public void renderShadows(LevelRendererAccessor levelRenderer, Camera playerCame boolean wasChunkCullingEnabled = client.smartCull; client.smartCull = false; - // Always schedule a terrain update - // TODO: Only schedule a terrain update if the sun / moon is moving, or the shadow map camera moved. - // We have to ensure that we don't regenerate clouds every frame, since that's what needsUpdate ends up doing. - // This took up to 10% of the frame time before we applied this fix! That's really bad! - - // TODO IMS 24w35a determine clouds - ((LevelRenderer) levelRenderer).needsUpdate(); + // forcing a terrain update it not necessary here, sodium figured it out on its own // Execute the vanilla terrain setup / culling routines using our shadow frustum. levelRenderer.invokeSetupRender(playerCamera, terrainFrustumHolder.getFrustum(), false, false);