Fog does not render behind DH's glass

Self explanatory. Happens in the latest nightly build. I know transparency and stuff is complicated, hopefully there is an easy fix.
No description
19 Replies
CreepermeYT
CreepermeYTOP4mo ago
When nobody writes anything I suppose it's because the bug report is an actual bug with no fix
Puhpine
Puhpine4mo ago
usually thats the case yea. ill try to replicate when im home, but the chance is very high that ill be seeing the same thing Forgot I don't have time today
CreepermeYT
CreepermeYTOP4mo ago
np, chances are that James is already silently working on a fix and will post "Just pushed a fix." at any time as he usually does I really appreciate James' dedication to DH even when it is only his hobby he is always actively contributing to DH's development
Puhpine
Puhpine4mo ago
can confirm, also happens with me
No description
Puhpine
Puhpine4mo ago
@James Seibel (GMT-6) is this something that can be easily solved? water has the same issue btw
BackSun
BackSun4mo ago
Currently fog only renders once at the very end of the pipeline. So missing fog behind glass is expected behavior. I could try running the fog twice (once after opaque and once after transparent rendering), although that might cause issues with double applying fog to opaque areas and would cause a performance drop. Personally I don’t think this problem is worth fixing since most of the time DH isn’t rendering large glass areas, but if other people think it’s a problem I can take a closer look.
Puhpine
Puhpine4mo ago
yea its not that major indeed
CreepermeYT
CreepermeYTOP4mo ago
There's no problem, I understand it's not a priority rn. I was just wondering, if the fog is at the very end of the pipeline, could it be rendered just before the transparency pass instead? or would it break something?
BackSun
BackSun4mo ago
If you did it that way then oceans wouldn’t have fog, since water is rendered during the transparent pass.
CreepermeYT
CreepermeYTOP4mo ago
Right.. No problem then its not a major bug
CreepermeYT
CreepermeYTOP3mo ago
This is what happens when you disable glDepthMask() for the transparency pass
No description
CreepermeYT
CreepermeYTOP3mo ago
And this is what happens when you get it working somehow
No description
CreepermeYT
CreepermeYTOP3mo ago
But then the ocean has no fog I give up man, I don know how to code, I was doing my best
CreepermeYT
CreepermeYTOP3mo ago
nICe 😄
No description
Miki_P98
Miki_P983mo ago
Listen! No fog no problem.... right? Just remove it xD
BackSun
BackSun3mo ago
lol don’t take it personally. Depth sorting and the like are famously difficult problems to get right 😅
CreepermeYT
CreepermeYTOP3mo ago
I mean the way I got this one working is by creating a copy of the depth texture right before the transparency pass. Then the fogshader would use the copy of the depth texture which would make it bypass glass. Side effects: oceans' surface don't have fog Here i messed up with the depth texture and the fog shader just gave up Fog would be fixed for all transparent surfaces now. However, to fix the ocean issue, maybe there could be a way to make only water write on the fog's copy of the depth texture. But I have no clue how to implement that. I was not kidding when I said I do not know how to code. I literally just installed IntelliJ and looked for some tutorials. I have some basic Java knowledge but that's it. I think there's nothing to do actually, because there is no way to distinguish transparent vbos made from water to those made from other transparent blocks like glass. Therefore, its either all transparent surfaces have fog passthrough, or none. I'll consider this bug unfixable or at least unfixable without adding unnecessary complexity to the code.
Miki_P98
Miki_P983mo ago
There is some data about the block type stored in the vertex As least when shaders are active DH water gets its own render shader with shaders Ther must be a way to do it in vanilla DH
CreepermeYT
CreepermeYTOP3mo ago
That's good news, but I've got no clue how to access that data
Want results from more Discord servers?
Add your server