Transparent objects crossing the waterline are drawn wholly above or below the water #1645

Open
opened 2026-11-20 02:56:21 +00:00 by sky_line · 0 comments
Owner

Alpha-blended objects that cross the waterline are sorted wholly before or after the water surface by their bounding-box centre. There is no per-fragment split above / below the water plane.

Symptom: a transparent object partly in the water (glass, a translucent hull, a jellyfish, a tinted float) can draw entirely in front of, or entirely behind, the water surface, so its submerged part may look un-refracted and un-fogged, or its above-water part may look underwater.

Found by: the Codex water bug audit (branch water-bugs bad649ac2e, report-only), lead 3. It was routed through the #1637 work, which fixed leads 1 and 2 (refraction rejection) but left this one, because a per-fragment split is not a quick fix.

To do:

  1. The owner tests whether this is a bug he has seen. If so, pick an approach:
    • split straddling alpha draws into above / below passes, clipped at the water plane;
    • or a per-fragment water-side test with two composites.
  2. Weigh the cost against how common straddling alpha is.

Not yet confirmed in-world.

Alpha-blended objects that cross the waterline are sorted wholly before or after the water surface by their bounding-box centre. There is no per-fragment split above / below the water plane. **Symptom:** a transparent object partly in the water (glass, a translucent hull, a jellyfish, a tinted float) can draw entirely in front of, or entirely behind, the water surface, so its submerged part may look un-refracted and un-fogged, or its above-water part may look underwater. **Found by:** the Codex water bug audit (branch `water-bugs` bad649ac2e, report-only), lead 3. It was routed through the #1637 work, which fixed leads 1 and 2 (refraction rejection) but left this one, because a per-fragment split is not a quick fix. **To do:** 1. The owner tests whether this is a bug he has seen. If so, pick an approach: - split straddling alpha draws into above / below passes, clipped at the water plane; - or a per-fragment water-side test with two composites. 2. Weigh the cost against how common straddling alpha is. Not yet confirmed in-world.
sky_line added this to the Slipstream project 2026-11-20 02:56:21 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#1645
No description provided.