Skip to content

Draw the line after the level, so water no longer tints it - #29

Merged
WilyFoxM merged 1 commit into
mainfrom
fix/line-over-water
Nov 13, 2026
Merged

WilyFoxM merged 1 commit into
mainfrom
fix/line-over-water

Conversation

@WilyFoxM

Copy link
Copy Markdown
Owner

Problem and resulting behavior

Without a shader pack, water tinted the line blue: the dots, the ghost bobber and the ring over water. The line went into the level's own submits, and water is drawn after them. With improved transparency on, water is also composed separately at the end of the frame.

The line is now always drawn after the level render, onto the finished image and depth-tested against the main depth buffer. Until now this path was used only with an Iris shader pack. So:

  • Water and other translucent layers no longer tint it, with or without improved transparency.
  • It still sits behind terrain as before, and the hidden part is still drawn faint and outlined.
  • It now also lies over particles, clouds and rain, as it already did with a shader pack.

AfterShaders is renamed AfterLevel to match. With a shader pack nothing changes.

Validation performed

  • GitHub checks (build, unit-tests, spotless): run on this PR.
  • Local checks actually run (JDK 25.0.4):
    • ./gradlew spotlessApply build passes.
    • Local client run, the fishing rod on water with no other mods, with improved transparency, and with Sodium 0.9.2: the bobber, the ring and the dots over water are no longer tinted. Before the change they were.
    • Bow, crossbow, throw, trident and zone option scenes with no other mods, compared pixel by pixel with the 0.1.0 release run:
      • the median frame differs by 0.1 of 255;
      • the largest differences are the settings page that gained the fishing rod switch in 0.2.0, and the crosshair turning animation, which varied between runs before too.
      • Side by side, the cross on a slime, the dots hidden behind a wall and the trident in water look the same.
    • Iris 1.11.4 with BSL v10.1.8: rod and Iris scenes differ from before by at most 2.37 of 255.
  • Prediction accuracy evidence: not applicable, predictions are unchanged.

Limits and compatibility

  • With improved transparency, water keeps its depth separately, so the dots under a water surface count as visible rather than hidden.
  • Other rendering mods besides Sodium and Iris were not tested.
  • I have not checked this in normal play yet.

The line went into the level's own submits, and water is drawn after them. It is now always drawn after the level render, as it already was with a shader pack, depth-tested against the main depth buffer. AfterShaders is renamed AfterLevel.
@WilyFoxM
WilyFoxM merged commit 69831f3 into main Nov 13, 2026
6 checks passed
@WilyFoxM
WilyFoxM deleted the fix/line-over-water branch November 13, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant