promotional banner

Window Resize Fix (Iris & Distant Horizons)

Fixes Distant Horizons breaking after a window resize with Iris, and the world's depth buffer not following a replaced render target.
Back to Files

irisscalefix-2.0.1

File nameirisscalefix-2.0.1.jar
Uploader
mzgmzg
Uploaded
Sep 3, 2026
Downloads
147
Size
14.3 KB
Mod Loaders
NeoForge
File ID
8801436
Type
R
Release
Supported game versions
  • 26.2
  • 26.1.2
  • 26.1.1
  • 26.1

Curse Maven Snippet

NeoForge

implementation "curse.maven:window-resize-fix-iris-distant-horizons-1648773:8801436"

Learn more about Curse Maven

What's new

Minecraft 26.1 – 26.2 support. One file covers 26.1, 26.1.1, 26.1.2 and 26.2 on NeoForge.

The two depth-buffer defects this mod exists for are still present in Iris 1.11.2 and 1.11.3 — read out of their compiled code, unchanged from Iris 1.8.14 three minor versions ago:

  • RenderTargets.resizeIfNeeded takes a new depth texture only when a version counter moves, and never compares the texture it is being handed.
  • DHCompatInternal.reconnectDHTextures is guarded by a texture id that does not change when only the attachment was replaced — so the Distant Horizons framebuffers, which Iris's own resize walk stomps, never get their depth back.

Both fixes are ported. A third fix from the 1.21.1 builds is deliberately not here: it detached a stale depth/stencil attachment that Iris left behind when it alternated between two attachment points based on a format cache keyed by texture id. On 26.x that method has no branch and no cache — it always attaches to GL_DEPTH_ATTACHMENT, and the format travels on the GpuTexture. The defect is gone upstream, so shipping the fix would cost work on every attachment in exchange for nothing.

New: each fix now reports two counters in the log — whether its hook ran at all, and whether it actually had to act. A hook that never runs is a different problem from a fix that was never needed, and the log now tells them apart. Each fix also has its own switch in config/irisscalefix.properties, re-read while the game is running.

Tested in game on Minecraft 26.2 / NeoForge 26.2.0.75 with Iris 1.11.2, Distant Horizons 3.2.0-b, RenderScale 1.4.0-alpha.4 and BSL 10.1.3. On 26.1.x every injection point and the render-target accessor are verified against that version's own Iris build and client jar, but it has not been played there.

Minecraft 1.21.1 users: stay on 1.3.1. The two are not interchangeable.

This mod has no additional files