Skip to content

Streaking artifacts below Y60 with Distant Horizons #360

Description

@Revanee

Using Distant Horizons with this shader produces streaking artifacts below Y60.
Here's a screenshot:

Image

Holding a map or going underwater prevents the artifacts from happening.

Some more details after debugging with AI:

Environment

Complementary Reimagined: r5.9.3
Distant Horizons: 3.3.0
Iris: 1.11.6
Sodium: 0.9.2
Minecraft: 26.3

Description

Below approximately Y~60, a screen-wide artifact affects lighting and reflection values and streaks across the frame when the camera moves. It is visible in all directions and persists regardless of whether the player is in a cave or open air. It does not occur underwater, and does not occur with Photon shader.

The artifact appears to be a stale data mask written into deferred lighting/PBR colortex buffers by DH's terrain LOD pass (which renders the surface above the player when below sea level).

Likely cause

shaders.properties declares blend modes for dh_water inside the #ifdef DISTANT_HORIZONS block, but dh_terrain has no blend mode declared at all. This leaves the OpenGL blend state for that pass undefined — it inherits whatever state was last active — allowing the DH terrain LOD pass to write stale/incorrect data into colortex buffers that the deferred lighting and reflection composites then read.

Photon avoids this by explicitly setting blend = off on every pass first, then re-enabling blending only on specific colortex slots that need it. Adding blend.dh_terrain = off (and explicit per-slot overrides where needed) to Complementary's DH block should fix this.

Workarounds

None that fully resolve it. Holding a filled map in the main hand partially reduces the artifact (likely alters which depth values are written that frame).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions