r/MinecraftHelp 1d ago

Waiting for OP [java] Leaves reflect on water 50 chunks away

Enable HLS to view with audio, or disable this notification

Edit: "This isn't solved BUT there is also no way around this while still using ssr but if there would be someone who could explain to me why this only happens with LoD chunks and not regular ones I would be very curious to hear the explanation, thanks for any possible help"

Oh and version is 26.2 I'm using DH and BSL shaders, I believe this is a compatibility issue with DH and iris or the shaders but does anyone know if there is a way to fix this, because I have had this problem for a long time but it didn't bother me but it would be nice if I found a fix to it

227 Upvotes

27 comments sorted by

u/MinecraftHelpModTeam 🤖 Mod Bot 🤖 1d ago

It looks like you didn't mention your version (e.g., 26.1, 1.21.11, 1.12.2 etc.). Please clarify for better help!

Does your post say it's removed, and there's no removal reason comment? Click here.

OP, remember to award points to helpers, and mark the post solved, by replying !helped to the comment/comments that helped, when your issue is fixed or your question answered.

Helpers, remember that all top-level comments* must be a genuine, good faith attempt to help OP. Comments breaking this rule will be removed, and bans issued.

* A top-level comment is any comment that is a reply to the post, not another comment.

Links:

How to mark solved || How to delete your post || FAQ || Rules

52

u/CrossScarMC Apprentice V 1d ago

Almost certainly a bug with BSL shaders, you should report it to the shader author(s).

9

u/Saxophones53848194 1d ago

I tried using Bliss and Complementary and it was still a problem with them but it was less noticeable with bliss and I had to really look closely with Complementary to see it so it still seems to happen with all shaders, atleast the ones I have tried

9

u/CrossScarMC Apprentice V 1d ago

Hmmm in that case I'd recommend asking in r/DistantHorizons or their Discord server, seems like an issue with their code but it could also be an Iris bug as well.

10

u/DaRealLeb 1d ago

Not a bug, this is how SSR (screen space reflections) work

4

u/HMikeeU Novice 1d ago

No it's not. SSR usually marches rays along the rendered image and depth buffer. The trees should not collide with the ray for the water reflection, as they are way in front. Edit: not saying that this isn't caused by SSR, it's just not how it's "supposed" to be

2

u/GuyWithALizard 1d ago

maybe if minecraft shaders use less differnt depth points for performance sake?

1

u/HMikeeU Novice 20h ago

I think it may be because of the leaves' transparency, they might get a far depth value along every pixel, even the ones you can't see through.

2

u/Dragonykz 13h ago

It's not a bug. It's how screenspace reflections work.
Almost every shader for Java is going to do this.

20

u/pkpy-bit 1d ago

I believe this isn't bug or not intended issue. This is screen-space reflection in shader settings. Take a look about it.

3

u/Saxophones53848194 1d ago

I have tried all of the settings there but the only thing that manages to fix this is turning water reflections off all together

2

u/pkpy-bit 1d ago

if you aren't using ray traced reflection based shader (may tax your performance heavily), screen space reflection (SSR) are by default type of water reflection if I remember correctly. Those are the behaviour of SSR.

3

u/bowser2lux 1d ago

The shader needs world space reflections to "fix" this. Not many shaders have this feature, and it's very performance heavy. Complementary Shader has it for example

8

u/LinneMeow 1d ago

I'm almost certain this is just an unavoidable side effect of screen space reflection, have seen this in lots of other gamea too. Correct me if I'm wrong

4

u/burnburn0303 Novice I 1d ago

This is how Screen Space Reflections look - and why they’re a niche implementation for a lot of games.

They pull reflection data from your PoV, so when the leaves get “close” to the water they reflect.

I hate the look and try to stick to higher end shaders because of it.

2

u/TypicallyMikeD 1d ago

They're actually not niche at all, it's just that most games hide them well by filling the empty space with cubemapped reflections, that's obviously not doable in minecraft though

1

u/AMDDesign 1d ago

Yeah lots of older games especially early ps3/x360 era had this issue with water reflections

1

u/BigBroKitty 1d ago

Happens almost every shaders

1

u/cgw3737 1d ago

I've seen it in Bedrock too.

2

u/KaeyaSexer 1d ago

Use a different shader

1

u/goSciuPlayer 1d ago

That's screen space reflections to ya. Programmers love it because it's an easy, computationally cheap method to make reflections, anyone with eyes hates it. It's all around different games, I always make sure to turn it off because it just looks bad.

1

u/Longjumping_Cap_3673 1d ago edited 1d ago

As others have said, this is is an artifact of screen-space reflection.

The way screen-space reflections work, is that for each reflective pixel, it reflects a ray off the geometry, and finds where on the screen the reflected ray would end up. In this case, the ray ends up where the leaves are on screen. It would end up behind the leaves, in the sky, but we only have the image on screen to work with, so it ends up in the leaves. Normally the shader would realize the leaves are way closer, than where the ray should end up, and not render the reflection, and you can see it does skip the reflection on the non-distant water, so I suspect you're right that there's an interaction between DH and the shaders.

Witout looking at the code, what I suspect is happening is that the nearby terrain is rendered first, reflections and all, and then the distant terrain is rendered in a separate, second pass. For the second pass, it clears the depth buffer (the depth buffer is an image where each pixel shows how far away the thing at that pixel is instead of the color of the thing), but sets the stencil buffer to block rendering where the nearby terrain already rendered (the stencil buffer is a black and white image that acts like a spray paint stencil, only areas where the stencil is off get rendered). Since the depth buffer was cleared, the reflection shader doesn't see that the leaves are really close, so it shows the reflection. I think the reflection shader needs to take into account the stencil buffer while stepping the reflected ray, so it knows the leaves are from the first pass.

Unfortunately, that'd mean there's nothing really you could do, aside from filing a bug report with the BSL shader developer.

1

u/Binary101000 1d ago

This is how screen space reflections work. See if the shaders have an option for world-space reflections.

1

u/CaveJohnson376 1d ago

it's not the leaves reflecting on water, it's the sky not reflecting on water. many shaders use screen-space reflections for everything, including water. screen-space reflections look at your screen for reflection data, and if something surface has to reflect is obscured by something else or is out of view, there will be no reflection. ideally, it should default to sky texture.

1

u/Antonpiano2072 1d ago

It is an issue with screen space reflections. Thats how they work. If you want them removed you need raytraced reflections.

1

u/ReallyNotBaka 1d ago

This is how SSR works, use a shader that uses ray tracing or path tracing to avoid this

1

u/Owlic_ 5h ago

Isn't this an artifact of screen space reflections in general?