Skip to content

Conversation

@URAKOLOUY5
Copy link

@URAKOLOUY5 URAKOLOUY5 commented Dec 20, 2025

This PR adjusts water clipping plane by 4 units up, enough to fix visible seam
Note: it leads to x2 performance usage as it renders view above but clips it early

Before:
image

After:
image

@URAKOLOUY5 URAKOLOUY5 changed the title Reduce water seam in water refraction Reduce seam in water refraction Dec 20, 2025
m_DrawFlags = DF_RENDER_REFRACTION | DF_CLIP_Z |
DF_RENDER_UNDERWATER | DF_FUDGE_UP |
DF_DRAW_ENTITITES ;
DF_DRAW_ENTITITES | DF_RENDER_ABOVEWATER;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This leads to a significant performance penalty as geometry above the water will be rendered twice (CAboveWaterView setup also adds this flag)

Removing this flag shows that the offset height hack doesn't work in isolation. The flag by itself fixes the issue, but this trade off in performance is not worth it

image

@ficool2
Copy link
Contributor

ficool2 commented Dec 20, 2025

The updated version of this PR leads to noticeable seams where the water intersects geometry

image

It also breaks the height depth blending effect, as noticeable here

Stock:
image

PR version:
image

@URAKOLOUY5 URAKOLOUY5 marked this pull request as draft December 20, 2025 18:23
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.

2 participants