Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.17 underwater fog is incorrect/broken #3

Open
ruvaldak opened this issue Aug 26, 2021 · 2 comments
Open

1.17 underwater fog is incorrect/broken #3

ruvaldak opened this issue Aug 26, 2021 · 2 comments

Comments

@ruvaldak
Copy link

ruvaldak commented Aug 26, 2021

1.17 changed underwater fog to linear fog, and no longer supports fogDensity. While Optifine has code to emulate density on linear fog, this doesn't exist (yet) on Iris, which causes fog to be entirely gone underwater. Might be best to rework the fog in the shader rather than relying on the shader mod to convert the deprecated fogDensity to linear fog.

image

@ruvaldak
Copy link
Author

ruvaldak commented Aug 26, 2021

As a preliminary, changing

float fog = (isEyeInWater>0) ? 1.-exp(-gl_FogFragCoord * gl_Fog.density):
clamp((gl_FogFragCoord-gl_Fog.start) * gl_Fog.scale, 0., 1.);`

in gbuffers_clouds.vsh to

float fog = clamp((gl_FogFragCoord-gl_Fog.start) * gl_Fog.scale, 0., 1.);

allows fog to be rendered underwater again, though not accurate to vanilla w/o shaders, and a little buggy visually

@ruvaldak
Copy link
Author

ruvaldak commented Aug 29, 2021

While this issue may be exclusive to Iris for now, until they get code in to emulate fog density, it is likely preferable to not rely on emulation in 1.17. Another issue related to fog in Iris with XorDev-Default is that fog beyond loaded chunks can sometimes be solid black. This may be related to only exponential fog, as this doesn't exist above the water in the overworld.
image

Other issues in Iris but not OF include: Beacon beam being solid black, block breaking decal not supporting any form of alpha

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

No branches or pull requests

1 participant