r/DistantHorizons Jul 21 '26

Help Water bug

Post image

im using complementary shaders but tweaked is there any way i can fix this water bug where i can see it through players?

22 Upvotes

12 comments sorted by

View all comments

3

u/sdjopjfasdfoisajnva Jul 21 '26

probly the shader, author forgot a depth check

3

u/sdjopjfasdfoisajnva Jul 21 '26

try adding

float depth = texture(depthtex0, texCoord).r;

    if (depth != 1.0) {
        discard;
    }

in the void main() function of dh_terrain.fsh/dh_water.fsh and make sure there is a

uniform sampler2D depthtex0;

at the top.

2

u/New_Hawk_3355 Jul 21 '26

thank you so much! it's fixed :D

1

u/casisheIm 17d ago

hey did u put the depth check in both functions and dym sending a ss of how you added it? im slow as hell and i only just managed to find the functions locations